﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.Design.Serialization;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Threading;
using System.Timers;
using RxjhServer.DbClss;
using RxjhServer.HelperTools;
using RxjhServer.Network;

namespace RxjhServer
{
    public class PlayersBes : 气功属性
    {
        private object thisLock = new object();

        public List<Players> tem = new List<Players>();

        public List<int> 快捷栏 = new List<int>();

        public List<int> 得到门徽ID = new List<int>();

        public List<string> 在线帮派成员;

        public bool 初始化标志;

        public ConfigClass Config;

        public bool 打开商店中;

        public bool 打开交易;

        public bool 打开个人商店;

        public bool 退出中;

        public bool 进店中;

        public bool 打坐状态;

        public bool 受保护状态;

        public bool 发型变化;

        public int 进店中ID;

        public bool 打开仓库中;

        public float 单次移动距离;

        public float Speed = 32f;

        private NetState _Client;

        public DateTime 加速时间;

        public DateTime 死亡时间;

        public DateTime 复活时间;

        public DateTime 副本时间;

        public int 检查次数;

        public int 移动超限次数;

        public bool _Player死亡;

        public bool 是否人物离线挂机;

        public bool 是否参加过势力战;

        public double 九转回心状态增加;

        public double 身轻如燕状态增加;

        public double 强筋护体状态增加;

        public double 太极罡气状态增加;

        public double 太极八卦状态增加;

        public double 太极五形状态增加;

        public double 怒气效果状态增加;

        public bool 上线;

        public string 客户端设置 = string.Empty;

        public bool 是否更新配置;

        public Dictionary<int, string> allChars;

        public 坐标Class 新坐标;

        public Dictionary<int, 灵兽类> 灵兽;

        public 灵兽类 人物灵兽;

        public int 新宠物ID;

        public 抓宠Class 收服宠物;

        public bool 是否召唤新宠物;

        public ThreadSafeDictionary<int, NpcClass> NpcList;

        public ThreadSafeDictionary<double, 地面物品类> 地面物品列表;

        public Hashtable 土灵符坐标;

        public ThreadSafeDictionary<int, 追加状态类> 追加状态列表;

        public 武功类[,] 武功新 = new 武功类[4, 32];

        public List<攻击类> 攻击列表;

        public List<攻击类> 灵兽攻击列表;

        public List<武功类> 武功连击;

        public 个人商店类 个人商店;

        public int 武功连击记数器;

        public int 综合仓库装备数据版本;

        public 物品类[] 个人仓库;

        public 物品类[] 公共仓库;

        public 物品类[] 装备栏包裹;

        public 物品类[] 装备栏已穿装备;

        public 气功类[] 气功;

        public 任务物品类[] 任务物品;

        public Dictionary<int, 任务类> 任务;

        public 师徒类 师傅数据;

        public 师徒类[] 徒弟数据;

        public 交易类 交易;

        public int GM模式;

        public int FLD_TGRS;
        public int FLD_TGYJLJD;
        public string FLD_TGY;



        public int 组队id;
        public int PVP分数;
        public int FC分数;
        public double 当前移动距离;
        public byte[] 移动封包 = new byte[61];

        public int 组队阶段;

        public byte[] 五色神丹;

        public byte[] 追加状态物品;

        public int 行走状态id = 1;

        public int 是否轻功 = 0;

        public int 掉线修复次 = 0;
        public int 换线过程时间秒 = 0;
        public float 换线X = 0;
        public float 换线Y = 0;
        public int 换线MAP = 0;


        public int 自动挂机监视时间;

        public DateTime 自动打怪监视器;

        public int 自动挂机地图;

        public int 自动挂机坐标X;

        public int 自动挂机坐标Y;

        public int 自动补给;
        public NpcClass 离线打怪当前攻击怪物;
        public int 离线打怪模拟走路秒;
        public int 离线打怪查NPN失败次;
        public int 离线挂机打怪模式 = 0;
        public DateTime 离线挂机打怪时间= DateTime.Now;
        public int 离线打怪自动刷新坐标秒 = 0;
        public int 离线打怪是否有怪打 = 0;
        public int 离线挂机武功ID;
        

        public int 离线打怪位置标示;

        //public int 宠物行走状态id = 1;

        public int 走跑状态;

        public int 宠物行走状态id = 1;

        public int 关起来;

        public System.Timers.Timer 查坐标 = new System.Timers.Timer(6000.0);

        public DateTime PKhmtime;

        public DateTime ZXtime;

        public DateTime CheckMoveTimer;
        public DateTime 仓库检测时间;
        public DateTime 仓库间隔时间;
        public DateTime CheckfzTimer;

        public DateTime 数据存储time;
        public DateTime 换线间隔;

        public DateTime 买物品间隔;

        public DateTime 交易完成间隔;

        public DateTime 死亡复活不掉物品;

        public DateTime 交易放物品间隔;

        public Dictionary<int, 个人传书类> 传书列表;

        private int _所在服务器ID;

        private int _人物位置;

        private int _人物轻功;

        private string _userid = string.Empty;

        private string _内网ip;

        private string _连接ip = string.Empty;

        private string _usermac;

        private string _UserName = string.Empty;

        private int _副本次数;

        private int _BOSS次数;

        private int _签名类型;

        private string _个性签名 = string.Empty;

        private int _帮派Id;

        private string _帮派名字 = string.Empty;

        private int _帮派等级;

        private int _帮派人物等级;

        private int _帮派门服字;

        private byte[] _帮派门徽;

        private int _帮派门服颜色;

        private int _人物历练;

        private long _人物经验;

        private long _人物最大经验;

        private int _人物钱数;

        private int _护心丹使用时间;

        private int _人物_HP;

        private int _人物_VIP_HP;

        private int _人物_气功_追加_HP;

        private int _人物基本最大_HP;

        private int _人物追加最大_HP;

        private int _人物_MP;

        private int _人物基本最大_MP;

        private int _人物追加最大_MP;

        private int _人物_气功_追加_MP;

        private int _人物_SP;

        private int _人物最大_SP;

        private int _人物_气功_追加SP时间;

        private int _人物没加气功点;

        private int _人物正邪;

        private int _人物等级;

        private int _等级锁定状态;

        private int _冲级奖励;

        private int _人物武勋;

        private int _人物武勋阶段;

        private int _人物善恶;

        private int _人物职业;

        private int _人物职业等级;

        private int _人物会员等级;

        public 人物模板类 New人物模版;

        private byte[] _人物名字模版;

        private int _人物性别;

        private float _人物坐标_X;

        private float _人物坐标_Y;

        private float _人物坐标_Z;

        private int _人物坐标_地图;

        private int _人物负重;

        private int _人物负重总;

        private int _装备追加负重百分比;

        private int _气功追加负重百分比;

        private int _人物封包ID;

        private int _人物PK模式;

        private int _个人仓库钱数;

        private int _综合仓库钱数;

        private int _FLD_RXPIONT;

        private int _FLD_RXPIONTX;

        private int _FLD_积分;

        private int _人物任务级别;

        public Dictionary<int, 公有药品类> 公有药品;

        private int _Rxjh_WX;

        private int _FLD_VIP;
       


        private DateTime _FLD_VIPTIM;
        private DateTime _FLD_OUTSJ;

        private int _FLD_攻击速度;

        private string _FLD_临时师徒 = string.Empty;

        private double _FLD_追加百分比_攻击;

        private double _FLD_追加百分比_防御;

        private double _FLD_追加百分比_命中;

        private double _FLD_追加百分比_回避;

        private double _FLD_追加百分比_HP上限;

        private double _FLD_追加百分比_MP上限;

        private int _FLD_心;

        private int _FLD_体;

        private int _FLD_力;

        private int _FLD_身;

        private int _FLD_攻击;

        private int _FLD_VIP_攻击;

        private int _FLD_命中;

        private int _FLD_防御;

        private int _FLD_VIP_防御;

        private int _FLD_回避;

        private int _人物武勋增加_HP;

        private int _人物武勋增加_MP;

        private int _人物武勋增加_AT;

        private int _人物武勋增加_DF;

        private int _FLD_人物_气功_攻击;

        private int _FLD_人物_气功_命中;

        private int _FLD_人物_气功_防御;

        private int _FLD_人物_气功_回避;

        private double _FLD_人物_武功攻击力增加百分比;

        private double _FLD_人物_武功防御力增加百分比;

        private double _FLD_人物_气功_武功攻击力增加百分比;

        private double _FLD_人物_气功_武功防御力增加百分比;

        private int _FLD_人物_追加_攻击;

        private int _FLD_人物_追加_防御;

        private int _FLD_人物_追加_命中;

        private int _FLD_人物_追加_回避;

        private int _FLD_人物_追加_气功;

        private double _FLD_人物_追加_经验百分比;
        private double _FLD_人物_追加_爆率百分比;
        private double _FLD_人物_追加_金钱百分比;

        private double _FLD_人物_追加_历练百分比;

        private double _FLD_人物_追加_物品掉落概率百分比;

        public double _FLD_人物_追加_合成成功率百分比;

        private double _FLD_装备_追加_合成成功率百分比;

        private double _FLD_装备_追加_获得游戏币百分比;

        private double _FLD_装备_追加_死亡损失经验减少;

        private int _FLD_装备_追加_刀客力劈华山;

        private int _FLD_装备_追加_刀客摄魂一击;

        private int _FLD_装备_追加_刀客连环飞舞;

        private int _FLD_装备_追加_刀客必杀一击;

        private int _FLD_装备_追加_刀客狂风万破;

        private int _FLD_装备_追加_刀客四两千斤;

        private int _FLD_装备_追加_刀客真武绝击;

        private int _FLD_装备_追加_刀客稳如泰山;

        private int _FLD_装备_追加_刀客霸气破甲;

        private int _FLD_装备_追加_刀客暗影绝杀;

        private int _FLD_装备_追加_剑客长虹贯日;

        private int _FLD_装备_追加_剑客百变神行;

        private int _FLD_装备_追加_剑客连环飞舞;

        private int _FLD_装备_追加_剑客必杀一击;

        private int _FLD_装备_追加_剑客狂风万破;

        private int _FLD_装备_追加_剑客护身罡气;

        private int _FLD_装备_追加_剑客移花接木;

        private int _FLD_装备_追加_剑客回柳身法;

        private int _FLD_装备_追加_剑客冲冠一怒;

        private int _FLD_装备_追加_剑客怒海狂澜;

        private int _FLD_装备_追加_枪客金钟罩气;

        private int _FLD_装备_追加_枪客运气疗伤;

        private int _FLD_装备_追加_枪客连环飞舞;

        private int _FLD_装备_追加_枪客必杀一击;

        private int _FLD_装备_追加_枪客狂风万破;

        private int _FLD_装备_追加_枪客横练太保;

        private int _FLD_装备_追加_枪客乾坤挪移;

        private int _FLD_装备_追加_枪客灵甲护身;

        private int _FLD_装备_追加_枪客转守为攻;

        private int _FLD_装备_追加_枪客狂神降世;

        private int _FLD_装备_追加_弓百步穿杨;

        private int _FLD_装备_追加_弓猎鹰之眼;

        private int _FLD_装备_追加_弓凝神聚气;

        private int _FLD_装备_追加_弓必杀一击;

        private int _FLD_装备_追加_弓狂风万破;

        private int _FLD_装备_追加_弓正本培元;

        private int _FLD_装备_追加_弓心神凝聚;

        private int _FLD_装备_追加_弓流星三矢;

        private int _FLD_装备_追加_弓无明暗矢;

        private int _FLD_装备_追加_弓锐利之箭;

        private int _FLD_装备_追加_医运气行心;

        private int _FLD_装备_追加_医太极心法;

        private int _FLD_装备_追加_医洗髓易经;

        private int _FLD_装备_追加_医妙手回春;

        private int _FLD_装备_追加_医长功攻击;

        private int _FLD_装备_追加_医吸星大法;

        private int _FLD_装备_追加_医神农仙术;

        private int _FLD_装备_追加_医九天真气;

        private int _FLD_装备_追加_医体血倍增;

        private int _FLD_装备_追加_医天佑之气;

        public double _FLD_装备_追加_经验百分比;

        private double _FLD_装备_武功攻击力增加百分比;

        private double _FLD_装备_武功防御力增加百分比;

        private int _FLD_装备_追加_攻击;

        private int _FLD_装备_追加_防御;

        private int _减免对方伤害;

        private int _FLD_装备_追加_武器_强化;

        private int _FLD_装备_追加_防具_强化;

        private int _FLD_装备_追加_命中;

        private int _FLD_装备_追加_回避;

        private int _FLD_装备_追加_怒气;

        private int _FLD_装备_追加_气功;

        private int _FLD_武勋_追加_气功;

        private int _FLD_装备_追加_HP;

        private int _FLD_装备_追加_追伤;

        private int _FLD_装备_追加_MP;

        public bool Player死亡
        {
            get
            {
                if (人物_HP > 0)
                {
                    _Player死亡 = false;
                }
                return _Player死亡;
            }
            set
            {
                _Player死亡 = value;
            }
        }

        public NetState Client
        {
            get
            {
                if (World.jlMsg == 1)
                {
                    Form1.WriteLine(0, "PlayersBes_get Client()");
                }
                return _Client;
            }
            set
            {
                _Client = value;
            }
        }
        public int _当前操作NPC;
        public int 当前操作NPC
        {
            get
            {
                return _当前操作NPC;
            }
            set
            {
                _当前操作NPC = value;
            }
        }
        public int 所在主服务器ID
        {
            get
            {
                return _所在服务器ID;
            }
            set
            {
                _所在服务器ID = value;
            }
        }

        public int 人物灵兽全服ID
        {
            get
            {
                return 人物全服ID * 2 + 40000;
            }
        }

        public int 人物位置
        {
            get
            {
                return _人物位置;
            }
            set
            {
                _人物位置 = value;
            }
        }

        public int 人物轻功
        {
            get
            {
                return _人物轻功;
            }
            set
            {
                _人物轻功 = value;
            }
        }

        public string Userid
        {
            get
            {
                return _userid;
            }
            set
            {
                _userid = value;
            }
        }

        public string 内网ip
        {
            get
            {
                return _内网ip;
            }
            set
            {
                _内网ip = value;
            }
        }

        public string 连接ip
        {
            get
            {
                return _连接ip;
            }
            set
            {
                _连接ip = value;
            }
        }

        public string Usermac
        {
            get
            {
                return _usermac;
            }
            set
            {
                _usermac = value;
            }
        }

        public string UserName
        {
            get
            {
                return _UserName;
            }
            set
            {
                _UserName = value;
            }
        }

        public int 副本次数
        {
            get
            {
                return _副本次数;
            }
            set
            {
                _副本次数 = value;
            }
        }

        public int BOSS次数
        {
            get
            {
                return _BOSS次数;
            }
            set
            {
                _BOSS次数 = value;
            }
        }

        public int 签名类型
        {
            get
            {
                return _签名类型;
            }
            set
            {
                _签名类型 = value;
            }
        }

        public string 个性签名
        {
            get
            {
                return _个性签名;
            }
            set
            {
                _个性签名 = value;
            }
        }

        public int 帮派Id
        {
            get
            {
                return _帮派Id;
            }
            set
            {
                _帮派Id = value;
            }
        }

        public string 帮派名字
        {
            get
            {
                return _帮派名字;
            }
            set
            {
                _帮派名字 = value;
            }
        }

        public int 帮派等级
        {
            get
            {
                return _帮派等级;
            }
            set
            {
                _帮派等级 = value;
            }
        }

        public int 帮派人物等级
        {
            get
            {
                return _帮派人物等级;
            }
            set
            {
                _帮派人物等级 = value;
            }
        }

        public int 帮派门服字
        {
            get
            {
                return _帮派门服字;
            }
            set
            {
                _帮派门服字 = value;
            }
        }

        public byte[] 帮派门徽
        {
            get
            {
                return _帮派门徽;
            }
            set
            {
                _帮派门徽 = value;
            }
        }

        public int 帮派门服颜色
        {
            get
            {
                return _帮派门服颜色;
            }
            set
            {
                _帮派门服颜色 = value;
            }
        }

        public int Player_ExpErience
        {
            get
            {
                return _人物历练;
            }
            set
            {
                _人物历练 = value;
            }
        }

        public long 人物经验
        {
            get
            {
                return _人物经验;
            }
            set
            {
                _人物经验 = value;
            }
        }

        public long 人物最大经验
        {
            get
            {
                return _人物最大经验;
            }
            set
            {
                _人物最大经验 = value;
            }
        }

        public int Player_Money
        {
            get
            {
                return _人物钱数;
            }
            set
            {
                if (value < 0)
                {
                    _人物钱数 = 0;
                }
                else
                {
                    _人物钱数 = value;
                }
            }
        }

        public int 护心丹使用时间
        {
            get
            {
                return _护心丹使用时间;
            }
            set
            {
                _护心丹使用时间 = value;
            }
        }

        public int 人物_HP
        {
            get
            {
                return _人物_HP;
            }
            set
            {
                _人物_HP = value;
            }
        }

        public int 人物_VIP_HP
        {
            get
            {
                return _人物_VIP_HP;
            }
            set
            {
                _人物_VIP_HP = value;
            }
        }

        public int 人物最大_HP
        {
            get
            {
                return (int)((double)人物_VIP_HP + (double)(人物基本最大_HP + FLD_装备_追加_HP + 人物_气功_追加_HP + 人物追加最大_HP + 人物武勋增加_HP) * (1.0 + FLD_追加百分比_HP上限));
            }
        }

        public int 人物_气功_追加_HP
        {
            get
            {
                return _人物_气功_追加_HP;
            }
            set
            {
                _人物_气功_追加_HP = value;
            }
        }

        public int 人物基本最大_HP
        {
            get
            {
                return _人物基本最大_HP;
            }
            set
            {
                _人物基本最大_HP = value;
            }
        }

        public int 人物追加最大_HP
        {
            get
            {
                if (_人物追加最大_HP <= 0)
                {
                    return 0;
                }
                if (_人物追加最大_HP > 3000)
                {
                    return 3000;
                }
                return _人物追加最大_HP;
            }
            set
            {
                _人物追加最大_HP = value;
            }
        }

        public int 人物_MP
        {
            get
            {
                return _人物_MP;
            }
            set
            {
                _人物_MP = value;
            }
        }

        public int 人物最大_MP
        {
            get
            {
                return (int)((double)(人物基本最大_MP + FLD_装备_追加_MP + 人物_气功_追加_MP + 人物追加最大_MP + 人物武勋增加_HP) * (1.0 + FLD_追加百分比_MP上限));
            }
        }

        public int 人物基本最大_MP
        {
            get
            {
                return _人物基本最大_MP;
            }
            set
            {
                _人物基本最大_MP = value;
            }
        }

        public int 人物追加最大_MP
        {
            get
            {
                return _人物追加最大_MP;
            }
            set
            {
                _人物追加最大_MP = value;
            }
        }

        public int 人物_气功_追加_MP
        {
            get
            {
                return _人物_气功_追加_MP;
            }
            set
            {
                _人物_气功_追加_MP = value;
            }
        }

        public int 人物_SP
        {
            get
            {
                return _人物_SP;
            }
            set
            {
                _人物_SP = value;
            }
        }

        public int 人物最大_SP
        {
            get
            {
                return _人物最大_SP;
            }
            set
            {
                _人物最大_SP = value;
            }
        }

        public int 人物_气功_追加SP时间
        {
            get
            {
                return _人物_气功_追加SP时间;
            }
            set
            {
                _人物_气功_追加SP时间 = value;
            }
        }

        public int Player_Qigong_point
        {
            get
            {
                return _人物没加气功点;
            }
            set
            {
                _人物没加气功点 = value;
            }
        }

        #region 仙魔大战参数2
        private int 势力战临时正邪;
        private string 势力战临时名;
        private int _势力战死亡数;
        private int _势力战杀人数;
        private string _势力战派别;
        public string 势力战临时名字
        {
            get { return 势力战临时名; }
            set { 势力战临时名 = value; }
        }

        public int 势力战临时正邪值
        {
            get { return 势力战临时正邪; }
            set { 势力战临时正邪 = value; }
        }
        public int 势力战杀人数
        {
            get
            {
                return _势力战杀人数;
            }
            set
            {
                _势力战杀人数 = value;
            }
        }

        public int 势力战死亡数
        {
            get
            {
                return _势力战死亡数;
            }
            set
            {
                _势力战死亡数 = value;
            }
        }

        public string 势力战派别
        {
            get
            {
                return _势力战派别;
            }
            set
            {
                _势力战派别 = value;
            }
        }
        #endregion

        public int Player_Zx
        {
            get
            {
                return _人物正邪;
            }
            set
            {
                _人物正邪 = value;
            }
        }

        public int Player_Level
        {
            get
            {
                return _人物等级;
            }
            set
            {
                _人物等级 = value;
            }
        }

        public int Player_LockState
        {
            get
            {
                return _等级锁定状态;
            }
            set
            {
                _等级锁定状态 = value;
            }
        }

        public int Player_jllevel
        {
            get
            {
                return _冲级奖励;
            }
            set
            {
                _冲级奖励 = value;
            }
        }

        public int Player_WuXun
        {
            get
            {
                return _人物武勋;
            }
            set
            {
                _人物武勋 = value;
            }
        }

        public int 人物武勋阶段
        {
            get
            {
                return _人物武勋阶段;
            }
            set
            {
                _人物武勋阶段 = value;
            }
        }

        public int 人物善恶
        {
            get
            {
                return _人物善恶;
            }
            set
            {
                if (_人物善恶 + value > 0)
                {
                    _人物善恶 = 0;
                }
                else
                {
                    _人物善恶 = value;
                }
            }
        }

        public int Player_Job
        {
            get
            {
                return _人物职业;
            }
            set
            {
                _人物职业 = value;
            }
        }

        public int Player_Job_leve
        {
            get
            {
                return _人物职业等级;
            }
            set
            {
                _人物职业等级 = value;
            }
        }

        public int Player_vip_leve
        {
            get
            {
                return _人物会员等级;
            }
            set
            {
                _人物会员等级 = value;
            }
        }

        public byte[] 人物名字模版
        {
            get
            {
                return _人物名字模版;
            }
            set
            {
                _人物名字模版 = value;
            }
        }

        public int Player_Sex
        {
            get
            {
                return _人物性别;
            }
            set
            {
                _人物性别 = value;
            }
        }

        public float 人物坐标_X
        {
            get
            {
                return _人物坐标_X;
            }
            set
            {
                _人物坐标_X = value;
            }
        }
        public float 目标坐标X;
        public float 目标坐标Y;
        public float 人物坐标_Y
        {
            get
            {
                return _人物坐标_Y;
            }
            set
            {
                _人物坐标_Y = value;
            }
        }

        public float 人物坐标_Z
        {
            get
            {
                return _人物坐标_Z;
            }
            set
            {
                _人物坐标_Z = value;
            }
        }

        public int 人物坐标_地图
        {
            get
            {
                return _人物坐标_地图;
            }
            set
            {
                _人物坐标_地图 = value;
            }
        }

        public int 人物负重
        {
            get
            {
                return _人物负重;
            }
            set
            {
                _人物负重 = value;
            }
        }

        public int 人物负重总
        {
            get
            {
                return _人物负重总;
            }
            set
            {
                _人物负重总 = value;
            }
        }

        public int 装备追加负重百分比
        {
            get
            {
                return _装备追加负重百分比;
            }
            set
            {
                _装备追加负重百分比 = value;
            }
        }

        public int 气功追加负重百分比
        {
            get
            {
                return _气功追加负重百分比;
            }
            set
            {
                _气功追加负重百分比 = value;
            }
        }

        public int 人物总负重
        {
            get
            {
                return 人物负重总 * (1 + 气功追加负重百分比);
            }
        }

        public int 人物全服ID
        {
            get
            {
                return Client.WorldId;
            }
        }

        public int 人物封包ID
        {
            get
            {
                return _人物封包ID;
            }
            set
            {
                _人物封包ID = value;
            }
        }

        public int 人物PK模式
        {
            get
            {
                return _人物PK模式;
            }
            set
            {
                _人物PK模式 = value;
            }
        }

        public int 个人仓库钱数
        {
            get
            {
                return _个人仓库钱数;
            }
            set
            {
                _个人仓库钱数 = value;
            }
        }

        public int 综合仓库钱数
        {
            get
            {
                return _综合仓库钱数;
            }
            set
            {
                _综合仓库钱数 = value;
            }
        }

        public int FLD_RXPIONT
        {
            get
            {
                return _FLD_RXPIONT;
            }
            set
            {
                if (_FLD_RXPIONT > World.最大元宝数)
                {
                    _FLD_RXPIONT = World.最大元宝数;
                }
                else
                {
                    _FLD_RXPIONT = value;
                }
            }
        }

        public int FLD_RXPIONTX
        {
            get
            {
                return _FLD_RXPIONTX;
            }
            set
            {
                _FLD_RXPIONTX = value;
            }
        }

        public int FLD_积分
        {
            get
            {
                return _FLD_积分;
            }
            set
            {
                _FLD_积分 = value;
            }
        }

        public int 人物任务级别
        {
            get
            {
                return _人物任务级别;
            }
            set
            {
                _人物任务级别 = value;
            }
        }

        public int Rxjh_WX
        {
            get
            {
                return _Rxjh_WX;
            }
            set
            {
                _Rxjh_WX = value;
            }
        }

        public int FLD_VIP
        {
            get
            {
                return _FLD_VIP;
            }
            set
            {
                _FLD_VIP = value;
            }
        }

        public DateTime FLD_VIPTIM
        {
            get
            {
                return _FLD_VIPTIM;
            }
            set
            {
                _FLD_VIPTIM = value;
            }
        }
        public DateTime FLD_OUTSJ
        {
            get
            {
                return _FLD_OUTSJ;
            }
            set
            {
                _FLD_OUTSJ = value;
            }
        }

        public int FLD_攻击速度
        {
            get
            {
                return _FLD_攻击速度;
            }
            set
            {
                _FLD_攻击速度 = value;
            }
        }

        public string FLD_临时师徒
        {
            get
            {
                return _FLD_临时师徒;
            }
            set
            {
                _FLD_临时师徒 = value;
            }
        }

        public double FLD_追加百分比_攻击
        {
            get
            {
                if (_FLD_追加百分比_攻击 < 0.0)
                {
                    _FLD_追加百分比_攻击 = 0.0;
                }
                else if (_FLD_追加百分比_攻击 > 0.8)
                {
                    _FLD_追加百分比_攻击 = 0.0;
                }
                return _FLD_追加百分比_攻击;
            }
            set
            {
                if (value < 0.0)
                {
                    _FLD_追加百分比_攻击 = 0.0;
                }
                _FLD_追加百分比_攻击 = value;
            }
        }

        public double FLD_追加百分比_防御
        {
            get
            {
                if (_FLD_追加百分比_防御 <= 0.0)
                {
                    _FLD_追加百分比_防御 = 0.0;
                }
                else if (_FLD_追加百分比_防御 > 0.8)
                {
                    _FLD_追加百分比_防御 = 0.0;
                }
                return _FLD_追加百分比_防御;
            }
            set
            {
                if (value < 0.0)
                {
                    _FLD_追加百分比_防御 = 0.0;
                }
                _FLD_追加百分比_防御 = value;
            }
        }

        public double FLD_追加百分比_命中
        {
            get
            {
                return _FLD_追加百分比_命中;
            }
            set
            {
                _FLD_追加百分比_命中 = value;
            }
        }

        public double FLD_追加百分比_回避
        {
            get
            {
                return _FLD_追加百分比_回避;
            }
            set
            {
                _FLD_追加百分比_回避 = value;
            }
        }

        public double FLD_追加百分比_HP上限
        {
            get
            {
                if (_FLD_追加百分比_HP上限 < -0.5)
                {
                    _FLD_追加百分比_HP上限 = 0.0;
                }
                else if (_FLD_追加百分比_HP上限 > 1.8)
                {
                    _FLD_追加百分比_HP上限 = 1.8;
                }
                return _FLD_追加百分比_HP上限;
            }
            set
            {
                _FLD_追加百分比_HP上限 = value;
            }
        }

        public double FLD_追加百分比_MP上限
        {
            get
            {
                return _FLD_追加百分比_MP上限;
            }
            set
            {
                _FLD_追加百分比_MP上限 = value;
            }
        }

        public int FLD_心
        {
            get
            {
                return _FLD_心;
            }
            set
            {
                _FLD_心 = value;
            }
        }

        public int FLD_体
        {
            get
            {
                return _FLD_体;
            }
            set
            {
                _FLD_体 = value;
            }
        }

        public int FLD_力
        {
            get
            {
                return _FLD_力;
            }
            set
            {
                _FLD_力 = value;
            }
        }

        public int FLD_身
        {
            get
            {
                return _FLD_身;
            }
            set
            {
                _FLD_身 = value;
            }
        }

        public int FLD_攻击
        {
            get
            {
                return _FLD_攻击;
            }
            set
            {
                _FLD_攻击 = value;
            }
        }
        private string _FLD_情侣;
        public string FLD_情侣
        {
            get
            {
                return _FLD_情侣;
            }
            set
            {
                _FLD_情侣 = value;
            }
        }
        public int FLD_VIP_攻击
        {
            get
            {
                return _FLD_VIP_攻击;
            }
            set
            {
                _FLD_VIP_攻击 = value;
            }
        }

        public int FLD_命中
        {
            get
            {
                return _FLD_命中;
            }
            set
            {
                _FLD_命中 = value;
            }
        }

        public int FLD_防御
        {
            get
            {
                return _FLD_防御;
            }
            set
            {
                _FLD_防御 = value;
            }
        }

        public int FLD_VIP_防御
        {
            get
            {
                return _FLD_VIP_防御;
            }
            set
            {
                _FLD_VIP_防御 = value;
            }
        }

        public int FLD_回避
        {
            get
            {
                return _FLD_回避;
            }
            set
            {
                _FLD_回避 = value;
            }
        }

        public int 人物武勋增加_HP
        {
            get
            {
                return _人物武勋增加_HP;
            }
            set
            {
                _人物武勋增加_HP = value;
            }
        }

        public int 人物武勋增加_MP
        {
            get
            {
                return _人物武勋增加_MP;
            }
            set
            {
                _人物武勋增加_MP = value;
            }
        }

        public int 人物武勋增加_AT
        {
            get
            {
                return _人物武勋增加_AT;
            }
            set
            {
                _人物武勋增加_AT = value;
            }
        }

        public int 人物武勋增加_DF
        {
            get
            {
                return _人物武勋增加_DF;
            }
            set
            {
                _人物武勋增加_DF = value;
            }
        }

        public int FLD_人物基本_攻击
        {
            get
            {
                return (int)((double)FLD_VIP_攻击 + (double)(FLD_攻击 + FLD_装备_追加_攻击 + FLD_人物_追加_攻击 + FLD_人物_气功_攻击 + 人物武勋增加_AT) * (1.0 + FLD_追加百分比_攻击));
            }
        }

        public int FLD_人物基本_命中
        {
            get
            {
                return (int)((double)(FLD_命中 + FLD_装备_追加_命中 + FLD_人物_追加_命中 + FLD_人物_气功_命中) * (1.0 + FLD_追加百分比_命中));
            }
        }

        public int FLD_人物基本_防御
        {
            get
            {
                return (int)((double)FLD_VIP_防御 + (double)(FLD_防御 + FLD_装备_追加_防御 + FLD_人物_追加_防御 + FLD_人物_气功_防御 + 人物武勋增加_DF) * (1.0 + FLD_追加百分比_防御));
            }
        }

        public int FLD_人物基本_回避
        {
            get
            {
                return (int)((double)(FLD_回避 + FLD_装备_追加_回避 + FLD_人物_追加_回避 + FLD_人物_气功_回避) * (1.0 + FLD_追加百分比_回避));
            }
        }

        public int FLD_人物_气功_攻击
        {
            get
            {
                return _FLD_人物_气功_攻击;
            }
            set
            {
                _FLD_人物_气功_攻击 = value;
            }
        }

        public int FLD_人物_气功_命中
        {
            get
            {
                return _FLD_人物_气功_命中;
            }
            set
            {
                _FLD_人物_气功_命中 = value;
            }
        }

        public int FLD_人物_气功_防御
        {
            get
            {
                return _FLD_人物_气功_防御;
            }
            set
            {
                _FLD_人物_气功_防御 = value;
            }
        }

        public int FLD_人物_气功_回避
        {
            get
            {
                return _FLD_人物_气功_回避;
            }
            set
            {
                _FLD_人物_气功_回避 = value;
            }
        }

        public double FLD_人物_武功攻击力增加百分比
        {
            get
            {
                if (_FLD_人物_武功攻击力增加百分比 <= -0.5)
                {
                    return 0.0;
                }
                if (_FLD_人物_武功攻击力增加百分比 > 0.5)
                {
                    return 0.5;
                }
                return _FLD_人物_武功攻击力增加百分比;
            }
            set
            {
                _FLD_人物_武功攻击力增加百分比 = value;
            }
        }

        public double FLD_人物_武功防御力增加百分比
        {
            get
            {
                if (_FLD_人物_武功防御力增加百分比 <= -0.5)
                {
                    return 0.0;
                }
                if (_FLD_人物_武功防御力增加百分比 > 0.5)
                {
                    return 0.5;
                }
                return _FLD_人物_武功防御力增加百分比;
            }
            set
            {
                _FLD_人物_武功防御力增加百分比 = value;
            }
        }

        public double FLD_人物_气功_武功攻击力增加百分比
        {
            get
            {
                return _FLD_人物_气功_武功攻击力增加百分比;
            }
            set
            {
                _FLD_人物_气功_武功攻击力增加百分比 = value;
            }
        }

        public double FLD_人物_气功_武功防御力增加百分比
        {
            get
            {
                return _FLD_人物_气功_武功防御力增加百分比;
            }
            set
            {
                _FLD_人物_气功_武功防御力增加百分比 = value;
            }
        }

        public int FLD_人物_追加_攻击
        {
            get
            {
                if ((double)_FLD_人物_追加_攻击 <= -0.5)
                {
                    return 0;
                }
                if (_FLD_人物_追加_攻击 > 500)
                {
                    return 500;
                }
                return _FLD_人物_追加_攻击;
            }
            set
            {
                _FLD_人物_追加_攻击 = value;
            }
        }

        public int FLD_人物_追加_防御
        {
            get
            {
                if ((double)_FLD_人物_追加_防御 <= -0.5)
                {
                    return 0;
                }
                if (_FLD_人物_追加_防御 > 500)
                {
                    return 500;
                }
                return _FLD_人物_追加_防御;
            }
            set
            {
                _FLD_人物_追加_防御 = value;
            }
        }

        public int FLD_人物_追加_命中
        {
            get
            {
                return _FLD_人物_追加_命中;
            }
            set
            {
                _FLD_人物_追加_命中 = value;
            }
        }

        public int FLD_人物_追加_回避
        {
            get
            {
                return _FLD_人物_追加_回避;
            }
            set
            {
                _FLD_人物_追加_回避 = value;
            }
        }

        public int FLD_人物_追加_气功
        {
            get
            {
                return _FLD_人物_追加_气功;
            }
            set
            {
                _FLD_人物_追加_气功 = value;
            }
        }

        public double 人物_追加_经验百分比
        {
            get
            {
                return FLD_装备_追加_经验百分比 + FLD_人物_追加_经验百分比;
            }
        }
        public double _FLD_人物_复仇_经验百分比;
        public double FLD_人物_复仇_经验百分比
        {
            get
            {
                return _FLD_人物_复仇_经验百分比;
            }
            set
            {
                _FLD_人物_复仇_经验百分比 = value;
            }
        }
        public double FLD_人物_追加_经验百分比
        {
            get
            {
                return _FLD_人物_追加_经验百分比;
            }
            set
            {
                _FLD_人物_追加_经验百分比 = value;
            }
        }
        public double FLD_人物_追加_爆率百分比
        {
            get
            {
                return _FLD_人物_追加_爆率百分比;
            }
            set
            {
                _FLD_人物_追加_爆率百分比 = value;
            }
        }

        public double FLD_人物_追加_金钱百分比
        {
            get
            {
                return _FLD_人物_追加_金钱百分比;
            }
            set
            {
                _FLD_人物_追加_金钱百分比 = value;
            }
        }

        public double 人物_追加_金钱百分比
        {
            get
            {
                return FLD_装备_追加_获得游戏币百分比 + FLD_人物_追加_金钱百分比;
            }
        }

        public double FLD_人物_追加_历练百分比
        {
            get
            {
                return _FLD_人物_追加_历练百分比;
            }
            set
            {
                _FLD_人物_追加_历练百分比 = value;
            }
        }

        public double FLD_人物_追加_物品掉落概率百分比
        {
            get
            {
                return _FLD_人物_追加_物品掉落概率百分比;
            }
            set
            {
                _FLD_人物_追加_物品掉落概率百分比 = value;
            }
        }

        public double FLD_人物_追加_合成成功率百分比
        {
            get
            {
                return _FLD_人物_追加_合成成功率百分比;
            }
            set
            {
                _FLD_人物_追加_合成成功率百分比 = value;
            }
        }

        public double FLD_装备_追加_经验百分比
        {
            get
            {
                return _FLD_装备_追加_经验百分比;
            }
            set
            {
                _FLD_装备_追加_经验百分比 = value;
            }
        }

        public double FLD_装备_追加_获得游戏币百分比
        {
            get
            {
                return _FLD_装备_追加_获得游戏币百分比;
            }
            set
            {
                _FLD_装备_追加_获得游戏币百分比 = value;
            }
        }

        public double FLD_装备_追加_死亡损失经验减少
        {
            get
            {
                return _FLD_装备_追加_死亡损失经验减少;
            }
            set
            {
                _FLD_装备_追加_死亡损失经验减少 = value;
            }
        }

        public double FLD_装备_武功攻击力增加百分比
        {
            get
            {
                return _FLD_装备_武功攻击力增加百分比;
            }
            set
            {
                _FLD_装备_武功攻击力增加百分比 = value;
            }
        }

        public double FLD_装备_武功防御力增加百分比
        {
            get
            {
                return _FLD_装备_武功防御力增加百分比;
            }
            set
            {
                _FLD_装备_武功防御力增加百分比 = value;
            }
        }

        public int FLD_装备_追加_攻击
        {
            get
            {
                return _FLD_装备_追加_攻击;
            }
            set
            {
                _FLD_装备_追加_攻击 = value;
            }
        }

        public int FLD_装备_追加_防御
        {
            get
            {
                return _FLD_装备_追加_防御;
            }
            set
            {
                _FLD_装备_追加_防御 = value;
            }
        }

        public int 减免对方伤害
        {
            get
            {
                return _减免对方伤害;
            }
            set
            {
                _减免对方伤害 = value;
            }
        }

        public int FLD_装备_追加_武器_强化
        {
            get
            {
                if (_FLD_装备_追加_武器_强化 < 0)
                {
                    _FLD_装备_追加_武器_强化 = 0;
                }
                return _FLD_装备_追加_武器_强化;
            }
            set
            {
                _FLD_装备_追加_武器_强化 = value;
            }
        }

        public int FLD_装备_追加_防具_强化
        {
            get
            {
                if (_FLD_装备_追加_防具_强化 < 0)
                {
                    _FLD_装备_追加_防具_强化 = 0;
                }
                return _FLD_装备_追加_防具_强化;
            }
            set
            {
                _FLD_装备_追加_防具_强化 = value;
            }
        }

        public int FLD_装备_追加_命中
        {
            get
            {
                return _FLD_装备_追加_命中;
            }
            set
            {
                _FLD_装备_追加_命中 = value;
            }
        }

        public int FLD_装备_追加_回避
        {
            get
            {
                return _FLD_装备_追加_回避;
            }
            set
            {
                _FLD_装备_追加_回避 = value;
            }
        }

        public int FLD_装备_追加_怒气
        {
            get
            {
                return _FLD_装备_追加_怒气;
            }
            set
            {
                _FLD_装备_追加_怒气 = value;
            }
        }

        public int FLD_装备_追加_气功
        {
            get
            {
                return _FLD_装备_追加_气功;
            }
            set
            {
                _FLD_装备_追加_气功 = value;
            }
        }

        public int FLD_武勋_追加_气功
        {
            get
            {
                return _FLD_武勋_追加_气功;
            }
            set
            {
                _FLD_武勋_追加_气功 = value;
            }
        }

        public int FLD_装备_追加_HP
        {
            get
            {
                return _FLD_装备_追加_HP;
            }
            set
            {
                _FLD_装备_追加_HP = value;
            }
        }

        public int FLD_装备_追加_追伤
        {
            get
            {
                return _FLD_装备_追加_追伤;
            }
            set
            {
                _FLD_装备_追加_追伤 = value;
            }
        }

        public int FLD_装备_追加_MP
        {
            get
            {
                return _FLD_装备_追加_MP;
            }
            set
            {
                _FLD_装备_追加_MP = value;
            }
        }

        public int FLD_装备_追加_弓凝神聚气
        {
            get
            {
                return _FLD_装备_追加_弓凝神聚气;
            }
            set
            {
                _FLD_装备_追加_弓凝神聚气 = value;
            }
        }

        public int FLD_装备_追加_弓心神凝聚
        {
            get
            {
                return _FLD_装备_追加_弓心神凝聚;
            }
            set
            {
                _FLD_装备_追加_弓心神凝聚 = value;
            }
        }

        public int FLD_装备_追加_弓必杀一击
        {
            get
            {
                return _FLD_装备_追加_弓必杀一击;
            }
            set
            {
                _FLD_装备_追加_弓必杀一击 = value;
            }
        }

        public int FLD_装备_追加_弓无明暗矢
        {
            get
            {
                return _FLD_装备_追加_弓无明暗矢;
            }
            set
            {
                _FLD_装备_追加_弓无明暗矢 = value;
            }
        }

        public int FLD_装备_追加_弓正本培元
        {
            get
            {
                return _FLD_装备_追加_弓正本培元;
            }
            set
            {
                _FLD_装备_追加_弓正本培元 = value;
            }
        }

        public int FLD_装备_追加_弓流星三矢
        {
            get
            {
                return _FLD_装备_追加_弓流星三矢;
            }
            set
            {
                _FLD_装备_追加_弓流星三矢 = value;
            }
        }

        public int FLD_装备_追加_弓狂风万破
        {
            get
            {
                return _FLD_装备_追加_弓狂风万破;
            }
            set
            {
                _FLD_装备_追加_弓狂风万破 = value;
            }
        }

        public int FLD_装备_追加_弓猎鹰之眼
        {
            get
            {
                return _FLD_装备_追加_弓猎鹰之眼;
            }
            set
            {
                _FLD_装备_追加_弓猎鹰之眼 = value;
            }
        }

        public int FLD_装备_追加_弓百步穿杨
        {
            get
            {
                return _FLD_装备_追加_弓百步穿杨;
            }
            set
            {
                _FLD_装备_追加_弓百步穿杨 = value;
            }
        }

        public int FLD_装备_追加_弓锐利之箭
        {
            get
            {
                return _FLD_装备_追加_弓锐利之箭;
            }
            set
            {
                _FLD_装备_追加_弓锐利之箭 = value;
            }
        }

        public int FLD_装备_追加_枪客乾坤挪移
        {
            get
            {
                return _FLD_装备_追加_枪客乾坤挪移;
            }
            set
            {
                _FLD_装备_追加_枪客乾坤挪移 = value;
            }
        }

        public int FLD_装备_追加_枪客必杀一击
        {
            get
            {
                return _FLD_装备_追加_枪客必杀一击;
            }
            set
            {
                _FLD_装备_追加_枪客必杀一击 = value;
            }
        }

        public int FLD_装备_追加_枪客横练太保
        {
            get
            {
                return _FLD_装备_追加_枪客横练太保;
            }
            set
            {
                _FLD_装备_追加_枪客横练太保 = value;
            }
        }

        public int FLD_装备_追加_枪客灵甲护身
        {
            get
            {
                return _FLD_装备_追加_枪客灵甲护身;
            }
            set
            {
                _FLD_装备_追加_枪客灵甲护身 = value;
            }
        }

        public int FLD_装备_追加_枪客狂神降世
        {
            get
            {
                return _FLD_装备_追加_枪客狂神降世;
            }
            set
            {
                _FLD_装备_追加_枪客狂神降世 = value;
            }
        }

        public int FLD_装备_追加_枪客狂风万破
        {
            get
            {
                return _FLD_装备_追加_枪客狂风万破;
            }
            set
            {
                _FLD_装备_追加_枪客狂风万破 = value;
            }
        }

        public int FLD_装备_追加_枪客转守为攻
        {
            get
            {
                return _FLD_装备_追加_枪客转守为攻;
            }
            set
            {
                _FLD_装备_追加_枪客转守为攻 = value;
            }
        }

        public int FLD_装备_追加_枪客运气疗伤
        {
            get
            {
                return _FLD_装备_追加_枪客运气疗伤;
            }
            set
            {
                _FLD_装备_追加_枪客运气疗伤 = value;
            }
        }

        public int FLD_装备_追加_枪客连环飞舞
        {
            get
            {
                return _FLD_装备_追加_枪客连环飞舞;
            }
            set
            {
                _FLD_装备_追加_枪客连环飞舞 = value;
            }
        }

        public int FLD_装备_追加_枪客金钟罩气
        {
            get
            {
                return _FLD_装备_追加_枪客金钟罩气;
            }
            set
            {
                _FLD_装备_追加_枪客金钟罩气 = value;
            }
        }

        public int FLD_装备_追加_刀客力劈华山
        {
            get
            {
                return _FLD_装备_追加_刀客力劈华山;
            }
            set
            {
                _FLD_装备_追加_刀客力劈华山 = value;
            }
        }

        public int FLD_装备_追加_刀客四两千斤
        {
            get
            {
                return _FLD_装备_追加_刀客四两千斤;
            }
            set
            {
                _FLD_装备_追加_刀客四两千斤 = value;
            }
        }

        public int FLD_装备_追加_刀客必杀一击
        {
            get
            {
                return _FLD_装备_追加_刀客必杀一击;
            }
            set
            {
                _FLD_装备_追加_刀客必杀一击 = value;
            }
        }

        public int FLD_装备_追加_刀客摄魂一击
        {
            get
            {
                return _FLD_装备_追加_刀客摄魂一击;
            }
            set
            {
                _FLD_装备_追加_刀客摄魂一击 = value;
            }
        }

        public int FLD_装备_追加_刀客暗影绝杀
        {
            get
            {
                return _FLD_装备_追加_刀客暗影绝杀;
            }
            set
            {
                _FLD_装备_追加_刀客暗影绝杀 = value;
            }
        }

        public int FLD_装备_追加_刀客狂风万破
        {
            get
            {
                return _FLD_装备_追加_刀客狂风万破;
            }
            set
            {
                _FLD_装备_追加_刀客狂风万破 = value;
            }
        }

        public int FLD_装备_追加_刀客真武绝击
        {
            get
            {
                return _FLD_装备_追加_刀客真武绝击;
            }
            set
            {
                _FLD_装备_追加_刀客真武绝击 = value;
            }
        }

        public int FLD_装备_追加_刀客稳如泰山
        {
            get
            {
                return _FLD_装备_追加_刀客稳如泰山;
            }
            set
            {
                _FLD_装备_追加_刀客稳如泰山 = value;
            }
        }

        public int FLD_装备_追加_刀客连环飞舞
        {
            get
            {
                return _FLD_装备_追加_刀客连环飞舞;
            }
            set
            {
                _FLD_装备_追加_刀客连环飞舞 = value;
            }
        }

        public int FLD_装备_追加_刀客霸气破甲
        {
            get
            {
                return _FLD_装备_追加_刀客霸气破甲;
            }
            set
            {
                _FLD_装备_追加_刀客霸气破甲 = value;
            }
        }

        public int FLD_装备_追加_剑客冲冠一怒
        {
            get
            {
                return _FLD_装备_追加_剑客冲冠一怒;
            }
            set
            {
                _FLD_装备_追加_剑客冲冠一怒 = value;
            }
        }

        public int FLD_装备_追加_剑客回柳身法
        {
            get
            {
                return _FLD_装备_追加_剑客回柳身法;
            }
            set
            {
                _FLD_装备_追加_剑客回柳身法 = value;
            }
        }

        public int FLD_装备_追加_剑客必杀一击
        {
            get
            {
                return _FLD_装备_追加_剑客必杀一击;
            }
            set
            {
                _FLD_装备_追加_剑客必杀一击 = value;
            }
        }

        public int FLD_装备_追加_剑客怒海狂澜
        {
            get
            {
                return _FLD_装备_追加_剑客怒海狂澜;
            }
            set
            {
                _FLD_装备_追加_剑客怒海狂澜 = value;
            }
        }

        public int FLD_装备_追加_剑客护身罡气
        {
            get
            {
                return _FLD_装备_追加_剑客护身罡气;
            }
            set
            {
                _FLD_装备_追加_剑客护身罡气 = value;
            }
        }

        public int FLD_装备_追加_剑客狂风万破
        {
            get
            {
                return _FLD_装备_追加_剑客狂风万破;
            }
            set
            {
                _FLD_装备_追加_剑客狂风万破 = value;
            }
        }

        public int FLD_装备_追加_剑客百变神行
        {
            get
            {
                return _FLD_装备_追加_剑客百变神行;
            }
            set
            {
                _FLD_装备_追加_剑客百变神行 = value;
            }
        }

        public int FLD_装备_追加_剑客移花接木
        {
            get
            {
                return _FLD_装备_追加_剑客移花接木;
            }
            set
            {
                _FLD_装备_追加_剑客移花接木 = value;
            }
        }

        public int FLD_装备_追加_剑客连环飞舞
        {
            get
            {
                return _FLD_装备_追加_剑客连环飞舞;
            }
            set
            {
                _FLD_装备_追加_剑客连环飞舞 = value;
            }
        }

        public int FLD_装备_追加_剑客长虹贯日
        {
            get
            {
                return _FLD_装备_追加_剑客长虹贯日;
            }
            set
            {
                _FLD_装备_追加_剑客长虹贯日 = value;
            }
        }

        public int FLD_装备_追加_医九天真气
        {
            get
            {
                return _FLD_装备_追加_医九天真气;
            }
            set
            {
                _FLD_装备_追加_医九天真气 = value;
            }
        }

        public int FLD_装备_追加_医体血倍增
        {
            get
            {
                return _FLD_装备_追加_医体血倍增;
            }
            set
            {
                _FLD_装备_追加_医体血倍增 = value;
            }
        }

        public int FLD_装备_追加_医吸星大法
        {
            get
            {
                return _FLD_装备_追加_医吸星大法;
            }
            set
            {
                _FLD_装备_追加_医吸星大法 = value;
            }
        }

        public int FLD_装备_追加_医天佑之气
        {
            get
            {
                return _FLD_装备_追加_医天佑之气;
            }
            set
            {
                _FLD_装备_追加_医天佑之气 = value;
            }
        }

        public int FLD_装备_追加_医太极心法
        {
            get
            {
                return _FLD_装备_追加_医太极心法;
            }
            set
            {
                _FLD_装备_追加_医太极心法 = value;
            }
        }

        public int FLD_装备_追加_医妙手回春
        {
            get
            {
                return _FLD_装备_追加_医妙手回春;
            }
            set
            {
                _FLD_装备_追加_医妙手回春 = value;
            }
        }

        public int FLD_装备_追加_医洗髓易经
        {
            get
            {
                return _FLD_装备_追加_医洗髓易经;
            }
            set
            {
                _FLD_装备_追加_医洗髓易经 = value;
            }
        }

        public int FLD_装备_追加_医神农仙术
        {
            get
            {
                return _FLD_装备_追加_医神农仙术;
            }
            set
            {
                _FLD_装备_追加_医神农仙术 = value;
            }
        }

        public int FLD_装备_追加_医运气行心
        {
            get
            {
                return _FLD_装备_追加_医运气行心;
            }
            set
            {
                _FLD_装备_追加_医运气行心 = value;
            }
        }

        public int FLD_装备_追加_医长功攻击
        {
            get
            {
                return _FLD_装备_追加_医长功攻击;
            }
            set
            {
                _FLD_装备_追加_医长功攻击 = value;
            }
        }

        public double FLD_人物_合成成功率百分比
        {
            get
            {
                return FLD_人物_追加_合成成功率百分比 + FLD_装备_追加_合成成功率百分比;
            }
        }

        public double FLD_装备_追加_合成成功率百分比
        {
            get
            {
                return _FLD_装备_追加_合成成功率百分比;
            }
            set
            {
                _FLD_装备_追加_合成成功率百分比 = value;
            }
        }

        public void Clear()
        {
            移动封包 = new byte[61];
            当前移动距离 = 0;
            PVP分数 = 0;
            FC分数 = 0;
            在线帮派成员 = new List<string>();
            组队id = 0;
            客户端设置 = string.Empty;
            是否更新配置 = false;
            //所在主服务器ID = World.服务器ID;
            上线 = false;
            是否人物离线挂机 = false;
            是否参加过势力战 = false;
            受保护状态 = false;
            打坐状态 = false;
            综合仓库装备数据版本 = 1;
            PKhmtime = DateTime.Now;
            ZXtime = DateTime.Now;
            CheckMoveTimer = DateTime.Now;
            CheckfzTimer = DateTime.Now;
            数据存储time = DateTime.Now;
            退出中 = false;
            初始化标志 = true;
            灵兽.Clear();
            新宠物ID = -1;
            是否召唤新宠物 = false;
            收服宠物 = null;
            武功新 = new 武功类[4, 32];
            公有药品 = new Dictionary<int, 公有药品类>();
            任务 = new Dictionary<int, 任务类>();
            人物追加最大_HP = 0;
            人物追加最大_MP = 0;
            人物基本最大_HP = 0;
            FLD_装备_追加_HP = 0;
            人物_气功_追加_HP = 0;
            FLD_装备_追加_追伤 = 0;
            人物基本最大_MP = 0;
            FLD_装备_追加_MP = 0;
            人物_气功_追加_MP = 0;
            帮派门徽 = null;
            帮派人物等级 = 0;
            帮派名字 = string.Empty;
            帮派Id = 0;
            FLD_追加百分比_攻击 = 0.0;
            FLD_追加百分比_防御 = 0.0;
            FLD_追加百分比_命中 = 0.0;
            FLD_追加百分比_回避 = 0.0;
            FLD_追加百分比_HP上限 = 0.0;
            FLD_追加百分比_MP上限 = 0.0;
            FLD_人物_武功攻击力增加百分比 = 0.0;
            FLD_人物_武功防御力增加百分比 = 0.0;
            FLD_人物_追加_攻击 = 0;
            FLD_人物_追加_防御 = 0;
            FLD_人物_追加_命中 = 0;
            FLD_人物_追加_回避 = 0;
            FLD_人物_追加_气功 = 0;
            FLD_人物_追加_合成成功率百分比 = 0.0;
            FLD_人物_追加_经验百分比 = 0.0;
            FLD_人物_复仇_经验百分比 = 0.0;
            FLD_人物_追加_爆率百分比 = 0.0;
            FLD_人物_追加_历练百分比 = 0.0;
            FLD_人物_追加_金钱百分比 = 0.0;
            FLD_人物_追加_物品掉落概率百分比 = 0.0;
            FLD_装备_追加_刀客暗影绝杀 = 0;
            FLD_装备_追加_刀客力劈华山 = 0;
            FLD_装备_追加_弓百步穿杨 = 0;
            FLD_装备_追加_弓锐利之箭 = 0;
            FLD_装备_追加_枪客狂神降世 = 0;
            FLD_装备_追加_剑客怒海狂澜 = 0;
            FLD_装备_追加_剑客长虹贯日 = 0;
            FLD_装备_追加_枪客金钟罩气 = 0;
            FLD_装备_追加_医体血倍增 = 0;
            FLD_装备_追加_医天佑之气 = 0;
            FLD_装备_追加_刀客摄魂一击 = 0;
            FLD_装备_追加_刀客连环飞舞 = 0;
            FLD_装备_追加_刀客必杀一击 = 0;
            FLD_装备_追加_刀客狂风万破 = 0;
            FLD_装备_追加_刀客四两千斤 = 0;
            FLD_装备_追加_刀客真武绝击 = 0;
            FLD_装备_追加_刀客稳如泰山 = 0;
            FLD_装备_追加_刀客霸气破甲 = 0;
            FLD_装备_追加_剑客百变神行 = 0;
            FLD_装备_追加_剑客连环飞舞 = 0;
            FLD_装备_追加_剑客必杀一击 = 0;
            FLD_装备_追加_剑客狂风万破 = 0;
            FLD_装备_追加_剑客护身罡气 = 0;
            FLD_装备_追加_剑客移花接木 = 0;
            FLD_装备_追加_剑客回柳身法 = 0;
            FLD_装备_追加_剑客冲冠一怒 = 0;
            FLD_装备_追加_枪客运气疗伤 = 0;
            FLD_装备_追加_枪客连环飞舞 = 0;
            FLD_装备_追加_枪客必杀一击 = 0;
            FLD_装备_追加_枪客狂风万破 = 0;
            FLD_装备_追加_枪客横练太保 = 0;
            FLD_装备_追加_枪客乾坤挪移 = 0;
            FLD_装备_追加_枪客灵甲护身 = 0;
            FLD_装备_追加_枪客转守为攻 = 0;
            FLD_装备_追加_弓猎鹰之眼 = 0;
            FLD_装备_追加_弓凝神聚气 = 0;
            FLD_装备_追加_弓必杀一击 = 0;
            FLD_装备_追加_弓狂风万破 = 0;
            FLD_装备_追加_弓正本培元 = 0;
            FLD_装备_追加_弓心神凝聚 = 0;
            FLD_装备_追加_弓流星三矢 = 0;
            FLD_装备_追加_弓无明暗矢 = 0;
            FLD_装备_追加_医运气行心 = 0;
            FLD_装备_追加_医太极心法 = 0;
            FLD_装备_追加_医洗髓易经 = 0;
            FLD_装备_追加_医妙手回春 = 0;
            FLD_装备_追加_医长功攻击 = 0;
            FLD_装备_追加_医吸星大法 = 0;
            FLD_装备_追加_医神农仙术 = 0;
            FLD_装备_追加_医九天真气 = 0;
            FLD_装备_追加_合成成功率百分比 = 0.0;
            FLD_装备_追加_获得游戏币百分比 = 0.0;
            FLD_装备_武功攻击力增加百分比 = 0.0;
            FLD_装备_武功防御力增加百分比 = 0.0;
            FLD_装备_追加_攻击 = 0;
            FLD_装备_追加_防御 = 0;
            FLD_装备_追加_命中 = 0;
            FLD_装备_追加_回避 = 0;
            FLD_装备_追加_怒气 = 0;
            FLD_装备_追加_气功 = 0;
            FLD_武勋_追加_气功 = 0;
            FLD_装备_追加_防具_强化 = 0;
            FLD_装备_追加_武器_强化 = 0;
            FLD_装备_追加_经验百分比 = 0.0;
            减免对方伤害 = 0;
            base.连打几率 = 0.0;
            base.致命一击几率 = 0.0;
            base.反伤几率 = 0.0;
            base.破甲几率 = 0.0;
            base.武功致命几率 = 0.0;
            base.刀_暗影绝杀 = 0.0;
            base.刀_群攻威力 = 0.0;
            base.剑_护身罡气 = 0.0;
            base.剑_移花接木 = 0.0;
            base.剑_回柳身法 = 0.0;
            base.剑_怒海狂澜 = 0.0;
            base.剑_冲冠一怒 = 0.0;
            base.剑_无坚不摧 = 0.0;
            base.枪_运气疗伤 = 0.0;
            base.枪_灵甲护身 = 0.0;
            base.枪_乾坤挪移 = 0.0;
            base.枪_狂神降世 = 0.0;
            base.枪_转攻为守 = 0.0;
            base.枪_末日狂舞 = 0.0;
            base.弓_锐利之箭 = 0.0;
            base.弓_无明暗矢 = 0.0;
            base.医_运气疗心 = 0.0;
            base.医_长攻击力 = 0.0;
            base.医_吸星大法 = 0.0;
            FLD_攻击速度 = 100;
            关起来 = 0;
            加速时间 = DateTime.Now;
            仓库间隔时间 = DateTime.Now;
            死亡时间 = DateTime.Now;
            复活时间 = DateTime.Now;
            副本时间 = DateTime.Now;
            换线间隔 = DateTime.Now;
            买物品间隔 = DateTime.Now;
            交易完成间隔 = DateTime.Now;
            死亡复活不掉物品 = DateTime.Now;
            交易放物品间隔 = DateTime.Now;
            检查次数 = 0;
            九转回心状态增加 = 0.0;
            身轻如燕状态增加 = 0.0;
            强筋护体状态增加 = 0.0;
            太极罡气状态增加 = 0.0;
            太极八卦状态增加 = 0.0;
            太极五形状态增加 = 0.0;
            怒气效果状态增加 = 0.0;
            移动超限次数 = 0;
            组队阶段 = 0;
        }

        ~PlayersBes()
        {
        }

        public PlayersBes(NetState client)
        {
            在线帮派成员 = new List<string>();
            仓库间隔时间 = DateTime.Now;
            死亡复活不掉物品 = DateTime.Now;
            交易放物品间隔 = DateTime.Now;
            交易完成间隔 = DateTime.Now;
            买物品间隔 = DateTime.Now;
            仓库检测时间 = DateTime.Now;
            换线间隔 = DateTime.Now;
            组队阶段 = 0;
            组队id = 0;
            客户端设置 = string.Empty;
            是否更新配置 = false;
            //所在主服务器ID = World.服务器ID;
            上线 = false;
            人物封包ID = 0;
            是否人物离线挂机 = false;
            是否参加过势力战 = false;
            受保护状态 = false;
            打坐状态 = false;
            初始化标志 = true;
            综合仓库装备数据版本 = 1;
            PKhmtime = DateTime.Now;
            ZXtime = DateTime.Now;
            CheckMoveTimer = DateTime.Now;
            CheckfzTimer = DateTime.Now;
            数据存储time = DateTime.Now;
            Config = new ConfigClass();
            交易 = new 交易类();
            Client = client;
            发型变化 = false;
            NpcList = new ThreadSafeDictionary<int, NpcClass>();
            地面物品列表 = new ThreadSafeDictionary<double, 地面物品类>();
            公有药品 = new Dictionary<int, 公有药品类>();
            追加状态列表 = new ThreadSafeDictionary<int, 追加状态类>();
            土灵符坐标 = new Hashtable();
            攻击列表 = new List<攻击类>();
            灵兽攻击列表 = new List<攻击类>();
            武功连击 = new List<武功类>();
            武功新 = new 武功类[4, 32];
            装备栏包裹 = new 物品类[66];
            装备栏已穿装备 = new 物品类[15];
            气功 = new 气功类[15];
            任务 = new Dictionary<int, 任务类>();
            传书列表 = new Dictionary<int, 个人传书类>();
            个人仓库 = new 物品类[60];
            公共仓库 = new 物品类[60];
            任务物品 = new 任务物品类[36];
            师傅数据 = new 师徒类();
            徒弟数据 = new 师徒类[3];
            人物追加最大_HP = 0;
            人物追加最大_MP = 0;
            FLD_装备_追加_追伤 = 0;
            人物基本最大_HP = 0;
            FLD_装备_追加_HP = 0;
            人物_气功_追加_HP = 0;
            人物基本最大_MP = 0;
            FLD_装备_追加_MP = 0;
            人物_气功_追加_MP = 0;
            FLD_攻击速度 = 100;
            灵兽 = new Dictionary<int, 灵兽类>();
            新宠物ID = -1;
            是否召唤新宠物 = false;
            收服宠物 = null;
            加速时间 = DateTime.Now;
            死亡时间 = DateTime.Now;
            复活时间 = DateTime.Now;
            副本时间 = DateTime.Now;
            检查次数 = 0;
            九转回心状态增加 = 0.0;
            身轻如燕状态增加 = 0.0;
            强筋护体状态增加 = 0.0;
            太极罡气状态增加 = 0.0;
            太极八卦状态增加 = 0.0;
            太极五形状态增加 = 0.0;
            怒气效果状态增加 = 0.0;
            移动超限次数 = 0;
            关起来 = 0;
        }

        public void 气功Clear()
        {
            for (int i = 0; i < 12; i++)
            {
                气功[i] = new 气功类(new byte[4]);
            }
        }

        public void 任务Clear()
        {
            任务 = new Dictionary<int, 任务类>();
        }

        public void addFLD_追加百分比_攻击(double i)
        {
            using (new Lock(thisLock, "addFLD_追加百分比_攻击"))
            {
                FLD_追加百分比_攻击 += i;
            }
        }

        public void dllFLD_追加百分比_攻击(double i)
        {
            using (new Lock(thisLock, "dllFLD_追加百分比_攻击"))
            {
                FLD_追加百分比_攻击 -= i;
            }
        }

        public void addFLD_追加百分比_防御(double i)
        {
            using (new Lock(thisLock, "addFLD_追加百分比_防御"))
            {
                FLD_追加百分比_防御 += i;
            }
        }

        public void dllFLD_追加百分比_防御(double i)
        {
            using (new Lock(thisLock, "dllFLD_追加百分比_防御"))
            {
                FLD_追加百分比_防御 -= i;
            }
        }

        public void addFLD_装备_追加_武器_强化(int i)
        {
            using (new Lock(thisLock, "addFLD_装备_追加_武器_强化"))
            {
                FLD_装备_追加_武器_强化 += i;
            }
        }

        public void dllFLD_装备_追加_武器_强化(int i)
        {
            using (new Lock(thisLock, "dllFLD_装备_追加_武器_强化"))
            {
                FLD_装备_追加_武器_强化 -= i;
            }
        }

        public void addFLD_装备_追加_防具_强化(int i)
        {
            using (new Lock(thisLock, "addFLD_装备_追加_防具_强化"))
            {
                FLD_装备_追加_防具_强化 += i;
            }
        }

        public void dllFLD_装备_追加_防具_强化(int i)
        {
            using (new Lock(thisLock, "dllFLD_装备_追加_防具_强化"))
            {
                FLD_装备_追加_防具_强化 -= i;
            }
        }

        public bool 检查物品系统(Itimesx 属性)
        {
            if (属性.属性类型 != 0)
            {
                if (属性.属性类型 == 1)
                {
                    if (World.物品最高攻击值 != 0 && 属性.属性数量 >= World.物品最高攻击值)
                    {
                        return true;
                    }
                }
                else if (属性.属性类型 == 2)
                {
                    if (World.物品最高防御值 != 0 && 属性.属性数量 >= World.物品最高防御值)
                    {
                        return true;
                    }
                }
                else if (属性.属性类型 == 7)
                {
                    if (World.物品最高武功值 != 0 && 属性.属性数量 >= World.物品最高武功值)
                    {
                        return true;
                    }
                }
                else if (属性.属性类型 == 11 && World.物品最高武防值 != 0 && 属性.属性数量 >= World.物品最高武防值)
                {
                    return true;
                }
            }
            return false;
        }

        public void 检查物品系统(string 位置, ref 物品类 物品)
        {
            if (World.查非法物品 != 1 || (!World.查绑定非法物品 && 物品.物品绑定))
            {
                return;
            }
            if (物品.属性1.属性类型 != 0 && 检查物品系统(物品.属性1))
            {
                Form1.WriteLine(77, "非法物品 " + 位置 + " [" + Userid + "]-[" + UserName + "] 位置[" + 物品.物品位置 + "] 编号[" + BitConverter.ToInt32(物品.物品全局ID, 0) + "] 物品名称[" + 物品.得到物品名称() + "] 物品数量[" + BitConverter.ToInt32(物品.物品数量, 0) + "] 属性:[" + 物品.FLD_MAGIC0 + "," + 物品.FLD_MAGIC1 + "," + 物品.FLD_MAGIC2 + "," + 物品.FLD_MAGIC3 + "," + 物品.FLD_MAGIC4 + "]");
                if (World.查非法物品操作 == 1)
                {
                    物品.物品_byte = new byte[37];
                }
                else if (World.查非法物品操作 == 2)
                {
                    string sqlCommand = string.Format("UPDATE TBL_ACCOUNT SET FLD_ZT=1 WHERE FLD_ID='{0}'", Userid);
                    DBA.ExeSqlCommand(sqlCommand, "rxjhaccount");
                    if (Client != null)
                    {
                        OpClient(1);
                        Client.Dispose();
                    }
                }
            }
            else if (物品.属性2.属性类型 != 0 && 检查物品系统(物品.属性2))
            {
                Form1.WriteLine(77, "非法物品 " + 位置 + " [" + Userid + "]-[" + UserName + "] 位置[" + 物品.物品位置 + "] 编号[" + BitConverter.ToInt32(物品.物品全局ID, 0) + "] 物品名称[" + 物品.得到物品名称() + "] 物品数量[" + BitConverter.ToInt32(物品.物品数量, 0) + "] 属性:[" + 物品.FLD_MAGIC0 + "," + 物品.FLD_MAGIC1 + "," + 物品.FLD_MAGIC2 + "," + 物品.FLD_MAGIC3 + "," + 物品.FLD_MAGIC4 + "]");
                if (World.查非法物品操作 == 1)
                {
                    物品.物品_byte = new byte[37];
                }
                else if (World.查非法物品操作 == 2)
                {
                    string sqlCommand2 = string.Format("UPDATE TBL_ACCOUNT SET FLD_ZT=1 WHERE FLD_ID='{0}'", Userid);
                    DBA.ExeSqlCommand(sqlCommand2, "rxjhaccount");
                    if (Client != null)
                    {
                        OpClient(1);
                        Client.Dispose();
                    }
                }
            }
            else if (物品.属性3.属性类型 != 0 && 检查物品系统(物品.属性3))
            {
                Form1.WriteLine(77, "非法物品 " + 位置 + " [" + Userid + "]-[" + UserName + "] 位置[" + 物品.物品位置 + "] 编号[" + BitConverter.ToInt32(物品.物品全局ID, 0) + "] 物品名称[" + 物品.得到物品名称() + "] 物品数量[" + BitConverter.ToInt32(物品.物品数量, 0) + "] 属性:[" + 物品.FLD_MAGIC0 + "," + 物品.FLD_MAGIC1 + "," + 物品.FLD_MAGIC2 + "," + 物品.FLD_MAGIC3 + "," + 物品.FLD_MAGIC4 + "]");
                if (World.查非法物品操作 == 1)
                {
                    物品.物品_byte = new byte[37];
                }
                else if (World.查非法物品操作 == 2)
                {
                    string sqlCommand3 = string.Format("UPDATE TBL_ACCOUNT SET FLD_ZT=1 WHERE FLD_ID='{0}'", Userid);
                    DBA.ExeSqlCommand(sqlCommand3, "rxjhaccount");
                    if (Client != null)
                    {
                        OpClient(1);
                        Client.Dispose();
                    }
                }
            }
            else
            {
                if (物品.属性4.属性类型 == 0 || !检查物品系统(物品.属性4))
                {
                    return;
                }
                Form1.WriteLine(77, "非法物品 " + 位置 + " [" + Userid + "]-[" + UserName + "] 位置[" + 物品.物品位置 + "] 编号[" + BitConverter.ToInt32(物品.物品全局ID, 0) + "] 物品名称[" + 物品.得到物品名称() + "] 物品数量[" + BitConverter.ToInt32(物品.物品数量, 0) + "] 属性:[" + 物品.FLD_MAGIC0 + "," + 物品.FLD_MAGIC1 + "," + 物品.FLD_MAGIC2 + "," + 物品.FLD_MAGIC3 + "," + 物品.FLD_MAGIC4 + "]");
                if (World.查非法物品操作 == 1)
                {
                    物品.物品_byte = new byte[37];
                }
                else if (World.查非法物品操作 == 2)
                {
                    string sqlCommand4 = string.Format("UPDATE TBL_ACCOUNT SET FLD_ZT=1 WHERE FLD_ID='{0}'", Userid);
                    DBA.ExeSqlCommand(sqlCommand4, "rxjhaccount");
                    if (Client != null)
                    {
                        OpClient(1);
                        Client.Dispose();
                    }
                }
            }
        }
        public bool 检查背包复制(Players player)
        {
            bool 是否存在非法物品 = false;
            try
            {
              
                #region 检测身上跟身上重复全局物品
                long 身上全局id = 0;
                for (int i = 0; i < 15; i++)
                {
                    if ((player.装备栏已穿装备[i].Get物品全局ID != 0))
                    {
                        身上全局id = player.装备栏已穿装备[i].Get物品全局ID;
                        for (int j = i + 1; j < 15; j++)
                        {
                            if (身上全局id == player.装备栏已穿装备[j].Get物品全局ID)
                            {
                                Form1.WriteLine(77, "查复制 删除 身上物品 全局物品ID重复已删除[" + player.装备栏已穿装备[j].得到物品名称() + "][" + BitConverter.ToInt64(player.装备栏已穿装备[j].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.装备栏已穿装备[j].物品_byte = new byte[37];
                                player.系统提示("您身上第" + (j + 1) + "个物品是非法物品已经系统回收!", 10, "非法复制");
                                if (!是否存在非法物品)
                                {
                                    是否存在非法物品 = true;
                                }
                                //break;
                            }
                        }
                    }
                }
                #endregion

                #region 仓库重复检查
                long 个人仓库全局id = 0;
                for (int i = 0; i < 60; i++)
                {
                    if ((player.个人仓库[i].Get物品全局ID != 0))
                    {
                        个人仓库全局id = player.个人仓库[i].Get物品全局ID;
                        #region 检测人物仓库跟综合仓库全局重复
                        for (int j = i + 1; j < 60; j++)
                        {
                            if (个人仓库全局id == player.个人仓库[j].Get物品全局ID)
                            {
                                Form1.WriteLine(77, "查复制 删除 个人仓库 全局物品ID重复已删除[" + player.个人仓库[j].得到物品名称() + "][" + BitConverter.ToInt64(player.个人仓库[j].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.个人仓库[j].物品_byte = new byte[37];
                                player.系统提示("您个人仓库第" + (j + 1 )+ "个物品是非法物品已经系统回收!", 10, "非法复制");
                                if (!是否存在非法物品)
                                {
                                    是否存在非法物品 = true;
                                }
                                //break;
                            }
                        }
                        for (int b = 0; b < 60; b++)
                        {
                            if (个人仓库全局id == player.公共仓库[b].Get物品全局ID)
                            {
                                Form1.WriteLine(77, "查复制 删除 综合仓库 全局物品ID重复已删除[" + player.公共仓库[b].得到物品名称() + "][" + BitConverter.ToInt64(player.公共仓库[b].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.公共仓库[b].物品_byte = new byte[37];

                                player.系统提示("您综合仓库第" + (b + 1) + "个物品是非法物品已经系统回收!", 10, "非法复制");
                                if (!是否存在非法物品)
                                {
                                    是否存在非法物品 = true;
                                }
                            }
                        }
                        #endregion

                    }
                }
                long 综合仓库全局id = 0;
                for (int i = 0; i < 60; i++)
                {
                    if ((player.公共仓库[i].Get物品全局ID != 0))
                    {
                        综合仓库全局id = player.公共仓库[i].Get物品全局ID;
                        #region 综合仓库跟个人仓库全局重复检查
                        for (int j = i + 1; j < 60; j++)
                        {
                            if (综合仓库全局id == player.公共仓库[j].Get物品全局ID)
                            {
                                player.个人仓库[j].物品_byte = new byte[37];
                                Form1.WriteLine(77, "查复制 删除 个人仓库 全局物品ID重复已删除[" + player.公共仓库[j].得到物品名称() + "][" + BitConverter.ToInt64(player.公共仓库[j].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.系统提示("您综合仓库第" + (j + 1) + "个物品是非法物品已经系统回收!", 10, "非法复制");
                                if (!是否存在非法物品)
                                {
                                    是否存在非法物品 = true;
                                }
                                //break;
                            }
                        }
                        #endregion
                    }
                }
                #endregion

                #region 检测背包比对
                long 全局id = 0;
                for (int i = 0; i < 66; i++)
                {
                    if ((player.装备栏包裹[i].Get物品全局ID != 0))
                    {
                        全局id = player.装备栏包裹[i].Get物品全局ID;
                        #region 检测人物背包和背包全局重复
                        for (int j = i + 1; j < 66; j++)
                        {
                            if (全局id == player.装备栏包裹[j].Get物品全局ID)
                            {
                                Form1.WriteLine(77, "查复制 删除 装备栏包裹 全局物品ID重复已删除[" + player.装备栏包裹[j].得到物品名称() + "][" + BitConverter.ToInt64(player.装备栏包裹[j].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.装备栏包裹[j].物品_byte = new byte[37];

                                player.系统提示("您背包第" + (j + 1) + "个物品是非法物品已经系统回收!", 10, "非法复制");
                                if (!是否存在非法物品)
                                {
                                    是否存在非法物品 = true;
                                }
                                //break;
                            }
                        }
                        #endregion
                        #region 检测人物身上跟背包重复全局
                        for (int t = 0; t < 15; t++)
                        {
                            if (player.装备栏已穿装备[t].Get物品全局ID == 全局id)
                            {
                                Form1.WriteLine(77, "查复制 删除 穿装备身上的 全局物品ID重复已删除[" + player.装备栏已穿装备[t].得到物品名称() + "][" + BitConverter.ToInt64(player.装备栏已穿装备[t].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.装备栏已穿装备[t].物品_byte = new byte[37];

                                player.系统提示("您身上第" + (t + 1 )+ "个物品是非法物品已经系统回收!", 10, "非法复制");
                            }
                        }
                        #endregion
                        #region 检测人物身上跟个人和综合仓库比对
                        for (int b = 0; b < 60; b++)
                        {
                            if (全局id == player.个人仓库[b].Get物品全局ID)
                            {
                                Form1.WriteLine(77, "查复制 删除 个人仓库 全局物品ID重复已删除[" + player.个人仓库[b].得到物品名称() + "][" + BitConverter.ToInt64(player.个人仓库[b].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.个人仓库[b].物品_byte = new byte[37];

                                player.系统提示("您个人仓库第" + (b + 1) + "个物品是非法物品已经系统回收!", 10, "非法复制");
                            }
                            if (全局id == player.公共仓库[b].Get物品全局ID)
                            {
                                Form1.WriteLine(77, "查复制 删除 综合仓库 全局物品ID重复已删除[" + player.公共仓库[b].得到物品名称() + "][" + BitConverter.ToInt64(player.公共仓库[b].物品全局ID, 0).ToString() + "][" + player.Userid + "][" + player.UserName + "]");
                                player.公共仓库[b].物品_byte = new byte[37];
                                player.系统提示("您综合仓库第" + (b + 1 )+ "个物品是非法物品已经系统回收!", 10, "非法复制");
                            }
                        }
                        #endregion
                    }

                }
                #endregion

                if (是否存在非法物品)
                {
                    //player.保存人物的数据();
                    player.初始话装备篮包裹();
                    player.初始话已装备物品();
                    if (World.复制物品是否封号 == 1)
                    {
                        player.系统提示("您的行为已经造成封号如有疑问请联系管理!", 10, "处罚");
                        Form1.WriteLine(100, "非法复制登陆封号[" + player.Userid + "]-[" + player.Client.ToString() + "]");
                        Form1.WriteLine(98, "查复制物品人物ID[" + player.Userid + "]-人物名字[" + player.UserName + "]");
                        string sqlCommand4 = string.Format("UPDATE TBL_ACCOUNT SET FLD_ZT=1 WHERE FLD_ID='{0}'", player.Userid);
                        DBA.ExeSqlCommand(sqlCommand4, "rxjhaccount");
                        if (player.Client != null)
                        {
                            player.Client.Dispose();
                        }
                    }
                }
                return 是否存在非法物品;

            }
            catch (Exception exception)
            {
                Form1.WriteLine(6, "查复制物品_入 出错![" + player.Userid + "]-[" + player.UserName + "]" + exception.ToString());
            }
            return 是否存在非法物品;
        }


        //public void 检查背包复制(Players play)
        //{
        //    try
        //    {
        //        Dictionary<long, 物品类> dictionary = new Dictionary<long, 物品类>();
        //        dictionary.Clear();
        //        for (int i = 0; i < 66; i++)
        //        {
        //            物品类 value;
        //            if (dictionary.TryGetValue(BitConverter.ToInt64(play.装备栏包裹[i].物品全局ID, 0), out value) || World.查复制物品列表.Contains(BitConverter.ToInt64(play.装备栏包裹[i].物品全局ID, 0)))
        //            {
        //                Form1.WriteLine(77, "查复制 删除 装备栏包裹 物品[" + play.装备栏包裹[i].得到物品名称() + "][" + BitConverter.ToInt64(play.装备栏包裹[i].物品全局ID, 0).ToString() + "][" + play.Userid + "][" + play.UserName + "]");
        //                play.装备栏包裹[i].物品_byte = new byte[37];
        //                play.减去物品(i, value.Get物品数量);
        //            }
        //            else if (BitConverter.ToInt64(play.装备栏包裹[i].物品全局ID, 0) != 0)
        //            {
        //                dictionary.Add(BitConverter.ToInt64(play.装备栏包裹[i].物品全局ID, 0), play.装备栏包裹[i]);
        //            }
        //        }
        //        for (int j = 0; j < 15; j++)
        //        {
        //            if (World.查复制物品列表.Contains(BitConverter.ToInt64(play.装备栏已穿装备[j].物品全局ID, 0)))
        //            {
        //                Form1.WriteLine(77, "查复制 删除 装备栏已穿装备 物品[" + play.装备栏已穿装备[j].得到物品名称() + "][" + BitConverter.ToInt64(play.装备栏已穿装备[j].物品全局ID, 0).ToString() + "][" + play.Userid + "][" + play.UserName + "]");
        //                play.装备栏已穿装备[j].物品_byte = new byte[37];
        //            }
        //        }
        //        dictionary.Clear();
        //        for (int k = 0; k < 60; k++)
        //        {
        //            物品类 value2;
        //            if (dictionary.TryGetValue(BitConverter.ToInt64(play.公共仓库[k].物品全局ID, 0), out value2) || World.查复制物品列表.Contains(BitConverter.ToInt64(play.公共仓库[k].物品全局ID, 0)))
        //            {
        //                Form1.WriteLine(77, "查复制 删除 公共仓库 物品[" + play.公共仓库[k].得到物品名称() + "][" + BitConverter.ToInt64(play.公共仓库[k].物品全局ID, 0).ToString() + "][" + play.Userid + "][" + play.UserName + "]");
        //                play.公共仓库[k].物品_byte = new byte[37];
        //            }
        //            else if (BitConverter.ToInt64(play.公共仓库[k].物品全局ID, 0) != 0)
        //            {
        //                dictionary.Add(BitConverter.ToInt64(play.公共仓库[k].物品全局ID, 0), play.公共仓库[k]);
        //            }
        //        }
        //        dictionary.Clear();
        //        for (int l = 0; l < 60; l++)
        //        {
        //            物品类 value3;
        //            if (dictionary.TryGetValue(BitConverter.ToInt64(play.个人仓库[l].物品全局ID, 0), out value3) || World.查复制物品列表.Contains(BitConverter.ToInt64(play.个人仓库[l].物品全局ID, 0)))
        //            {
        //                Form1.WriteLine(77, "查复制 删除 个人仓库 物品[" + play.个人仓库[l].得到物品名称() + "][" + BitConverter.ToInt64(play.个人仓库[l].物品全局ID, 0).ToString() + "][" + play.Userid + "][" + play.UserName + "]");
        //                play.个人仓库[l].物品_byte = new byte[37];
        //            }
        //            else if (BitConverter.ToInt64(play.个人仓库[l].物品全局ID, 0) != 0)
        //            {
        //                dictionary.Add(BitConverter.ToInt64(play.个人仓库[l].物品全局ID, 0), play.个人仓库[l]);
        //            }
        //        }
        //        if (play.人物灵兽 != null)
        //        {
        //            dictionary.Clear();
        //            for (int m = 0; m < 16; m++)
        //            {
        //                物品类 value4;
        //                if (dictionary.TryGetValue(BitConverter.ToInt64(play.人物灵兽.宠物装备栏[m].物品全局ID, 0), out value4) || World.查复制物品列表.Contains(BitConverter.ToInt64(play.人物灵兽.宠物装备栏[m].物品全局ID, 0)))
        //                {
        //                    Form1.WriteLine(77, "查复制 删除 人物灵兽 物品[" + play.人物灵兽.宠物装备栏[m].得到物品名称() + "][" + BitConverter.ToInt64(play.人物灵兽.宠物装备栏[m].物品全局ID, 0).ToString() + "][" + play.Userid + "][" + play.UserName + "]");
        //                    play.人物灵兽.宠物装备栏[m].物品_byte = new byte[37];
        //                }
        //                else if (BitConverter.ToInt64(play.人物灵兽.宠物装备栏[m].物品全局ID, 0) != 0)
        //                {
        //                    dictionary.Add(BitConverter.ToInt64(play.人物灵兽.宠物装备栏[m].物品全局ID, 0), play.人物灵兽.宠物装备栏[m]);
        //                }
        //            }
        //        }
        //        dictionary.Clear();
        //    }
        //    catch (Exception ex)
        //    {
        //        Form1.WriteLine(77, "查复制 错误[" + play.Userid + "][" + play.UserName + "]" + ex);
        //    }
        //}

        public void 读出灵兽数据(long id)
        {
            try
            {
                string sqlCommand = string.Format("SELECT * FROM TBL_宠物数据 WHERE ItmeId ={0}", id);
                DataTable dBToDataTable = DBA.GetDBToDataTable(sqlCommand);
                if (dBToDataTable.Rows.Count > 0)
                {
                    人物灵兽 = new 灵兽类(id, Client, dBToDataTable);
                    人物灵兽.全服ID = 人物灵兽全服ID;
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "读出灵兽数据出错 [" + Userid + "][" + UserName + "][" + id + "] " + ex.Message);
            }
        }

        public void 更新气功()
        {
            using (new Lock(thisLock, "更新气功"))
            {
                人物_气功_追加_HP = 0;
                人物_气功_追加_MP = 0;
                人物_气功_追加SP时间 = 0;
                FLD_人物_气功_攻击 = 0;
                FLD_人物_气功_防御 = 0;
                FLD_人物_气功_命中 = 0;
                FLD_人物_气功_回避 = 0;
                FLD_人物_气功_武功攻击力增加百分比 = 0.0;
                FLD_人物_气功_武功防御力增加百分比 = 0.0;
                for (int i = 0; i < 11; i++)
                {
                    switch (i)
                    {
                        case 10:
                            if (Player_Level < 100 || Player_Job_leve < 5)
                            {
                                continue;
                            }
                            break;
                        case 9:
                            if (Player_Level < 90 || Player_Job_leve < 4)
                            {
                                continue;
                            }
                            break;
                        case 8:
                            if (Player_Level < 80 || Player_Job_leve < 4)
                            {
                                continue;
                            }
                            break;
                        case 7:
                            if (Player_Level < 60 || Player_Job_leve < 3)
                            {
                                continue;
                            }
                            break;
                        case 6:
                            if (Player_Level < 35 || Player_Job_leve < 2)
                            {
                                continue;
                            }
                            break;
                    }
                    byte[] 气功_byte = 气功[i].气功_byte;
                    if (气功_byte[0] != byte.MaxValue && 气功[i].气功量 > 0)
                    {
                        double num = BitConverter.ToInt16(气功_byte, 0);
                        if (num > 0.0)
                        {
                            if (num > 20.0)
                            {
                                num = 20.0;
                            }
                            num += (double)(FLD_装备_追加_气功 + FLD_人物_追加_气功 + FLD_武勋_追加_气功);
                            switch (Player_Job)
                            {
                                case 1:
                                    switch (i)
                                    {
                                        case 0:
                                            num += (double)FLD_装备_追加_刀客力劈华山;
                                            break;
                                        case 1:
                                            num += (double)FLD_装备_追加_刀客摄魂一击;
                                            break;
                                        case 2:
                                            num += (double)FLD_装备_追加_刀客连环飞舞;
                                            break;
                                        case 3:
                                            num += (double)FLD_装备_追加_刀客必杀一击;
                                            break;
                                        case 4:
                                            num += (double)FLD_装备_追加_刀客狂风万破;
                                            break;
                                        case 5:
                                            num += (double)FLD_装备_追加_刀客四两千斤;
                                            break;
                                        case 6:
                                            num += (double)FLD_装备_追加_刀客霸气破甲;
                                            break;
                                        case 7:
                                            num += (double)FLD_装备_追加_刀客真武绝击;
                                            break;
                                        case 8:
                                            num += (double)FLD_装备_追加_刀客暗影绝杀;
                                            break;
                                        case 9:
                                            num += (double)FLD_装备_追加_刀客稳如泰山;
                                            break;
                                    }
                                    break;
                                case 2:
                                    switch (i)
                                    {
                                        case 0:
                                            num += (double)FLD_装备_追加_剑客长虹贯日;
                                            break;
                                        case 1:
                                            num += (double)FLD_装备_追加_剑客百变神行;
                                            break;
                                        case 2:
                                            num += (double)FLD_装备_追加_剑客连环飞舞;
                                            break;
                                        case 3:
                                            num += (double)FLD_装备_追加_剑客必杀一击;
                                            break;
                                        case 4:
                                            num += (double)FLD_装备_追加_剑客狂风万破;
                                            break;
                                        case 5:
                                            num += (double)FLD_装备_追加_剑客护身罡气;
                                            break;
                                        case 6:
                                            num += (double)FLD_装备_追加_剑客移花接木;
                                            break;
                                        case 7:
                                            num += (double)FLD_装备_追加_剑客回柳身法;
                                            break;
                                        case 8:
                                            num += (double)FLD_装备_追加_剑客怒海狂澜;
                                            break;
                                        case 9:
                                            num += (double)FLD_装备_追加_剑客冲冠一怒;
                                            break;
                                    }
                                    break;
                                case 3:
                                    switch (i)
                                    {
                                        case 0:
                                            num += (double)FLD_装备_追加_枪客金钟罩气;
                                            break;
                                        case 1:
                                            num += (double)FLD_装备_追加_枪客运气疗伤;
                                            break;
                                        case 2:
                                            num += (double)FLD_装备_追加_枪客连环飞舞;
                                            break;
                                        case 3:
                                            num += (double)FLD_装备_追加_枪客必杀一击;
                                            break;
                                        case 4:
                                            num += (double)FLD_装备_追加_枪客狂风万破;
                                            break;
                                        case 5:
                                            num += (double)FLD_装备_追加_枪客横练太保;
                                            break;
                                        case 6:
                                            num += (double)FLD_装备_追加_枪客乾坤挪移;
                                            break;
                                        case 7:
                                            num += (double)FLD_装备_追加_枪客灵甲护身;
                                            break;
                                        case 8:
                                            num += (double)FLD_装备_追加_枪客狂神降世;
                                            break;
                                        case 9:
                                            num += (double)FLD_装备_追加_枪客转守为攻;
                                            break;
                                    }
                                    break;
                                case 4:
                                    switch (i)
                                    {
                                        case 0:
                                            num += (double)FLD_装备_追加_弓百步穿杨;
                                            break;
                                        case 1:
                                            num += (double)FLD_装备_追加_弓猎鹰之眼;
                                            break;
                                        case 2:
                                            num += (double)FLD_装备_追加_弓凝神聚气;
                                            break;
                                        case 3:
                                            num += (double)FLD_装备_追加_弓必杀一击;
                                            break;
                                        case 4:
                                            num += (double)FLD_装备_追加_弓狂风万破;
                                            break;
                                        case 5:
                                            num += (double)FLD_装备_追加_弓正本培元;
                                            break;
                                        case 6:
                                            num += (double)FLD_装备_追加_弓心神凝聚;
                                            break;
                                        case 7:
                                            num += (double)FLD_装备_追加_弓流星三矢;
                                            break;
                                        case 8:
                                            num += (double)FLD_装备_追加_弓锐利之箭;
                                            break;
                                        case 9:
                                            num += (double)FLD_装备_追加_弓无明暗矢;
                                            break;
                                    }
                                    break;
                                case 5:
                                    switch (i)
                                    {
                                        case 0:
                                            num += (double)FLD_装备_追加_医运气行心;
                                            break;
                                        case 1:
                                            num += (double)FLD_装备_追加_医太极心法;
                                            break;
                                        case 2:
                                            num += (double)FLD_装备_追加_医体血倍增;
                                            break;
                                        case 3:
                                            num += (double)FLD_装备_追加_医洗髓易经;
                                            break;
                                        case 4:
                                            num += (double)FLD_装备_追加_医妙手回春;
                                            break;
                                        case 5:
                                            num += (double)FLD_装备_追加_医长功攻击;
                                            break;
                                        case 6:
                                            num += (double)FLD_装备_追加_医吸星大法;
                                            break;
                                        case 7:
                                            num += (double)FLD_装备_追加_医神农仙术;
                                            break;
                                        case 8:
                                            num += (double)FLD_装备_追加_医天佑之气;
                                            break;
                                        case 9:
                                            num += (double)FLD_装备_追加_医九天真气;
                                            break;
                                    }
                                    break;
                            }
                            num *= World.气功百分比;
                            if (World.最大气功数 != 0 && num > (double)World.最大气功数)
                            {
                                num = World.最大气功数;
                            }
                            switch (Player_Job)
                            {
                                case 1:
                                    switch (i)
                                    {
                                        case 0:
                                            base.刀_力劈华山 = num * 0.005;
                                            FLD_人物_气功_攻击 = (int)num;
                                            break;
                                        case 1:
                                            FLD_人物_气功_命中 = (int)((double)FLD_命中 * (0.1 + 0.02 * num));
                                            break;
                                        case 2:
                                            base.连打几率 = (20.0 + num) * 0.01;
                                            break;
                                        case 3:
                                            base.致命一击几率 = (10.0 + num) * 0.01;
                                            break;
                                        case 4:
                                            人物_气功_追加SP时间 = (int)(num * 0.5);
                                            break;
                                        case 5:
                                            base.反伤几率 = num * 0.01;
                                            break;
                                        case 6:
                                            base.破甲几率 = 0.05 + num * 0.005;
                                            break;
                                        case 7:
                                            base.武功致命几率 = num * 0.01;
                                            break;
                                        case 8:
                                            base.刀_暗影绝杀 = 0.05 + num * 0.005;
                                            break;
                                        case 9:
                                            FLD_人物_气功_防御 = (int)((double)FLD_防御 * (0.003 * num));
                                            人物_气功_追加_HP = (int)((double)人物基本最大_HP * (0.005 * num));
                                            break;
                                        case 10:
                                            base.刀_群攻威力 = 0.001 * num;
                                            break;
                                    }
                                    break;
                                case 2:
                                    switch (i)
                                    {
                                        case 0:
                                            FLD_人物_气功_攻击 = (int)num;
                                            base.剑_长虹贯日 = 0.0075 * num;
                                            break;
                                        case 1:
                                            FLD_人物_气功_回避 = (int)num;
                                            base.剑_百变神行 = 0.01 * num;
                                            break;
                                        case 2:
                                            base.连打几率 = (20.0 + num) * 0.01;
                                            break;
                                        case 3:
                                            base.致命一击几率 = (10.0 + num) * 0.01;
                                            break;
                                        case 4:
                                            人物_气功_追加SP时间 = (int)(num * 0.5);
                                            break;
                                        case 5:
                                            base.剑_护身罡气 = num * 0.01;
                                            break;
                                        case 6:
                                            base.剑_移花接木 = 0.01 * num;
                                            break;
                                        case 7:
                                            FLD_人物_气功_武功攻击力增加百分比 = 0.008 * num;
                                            base.剑_回柳身法 = num * 0.01 * World.剑客回柳身法;
                                            break;
                                        case 8:
                                            base.剑_怒海狂澜 = 0.05 + num * 0.005;
                                            break;
                                        case 9:
                                            base.剑_冲冠一怒 = 0.05 + num * 0.005;
                                            break;
                                        case 10:
                                            base.剑_无坚不摧 = 0.008 * num;
                                            break;
                                    }
                                    break;
                                case 3:
                                    switch (i)
                                    {
                                        case 0:
                                            FLD_人物_气功_防御 = (int)(num + (double)FLD_防御 * (0.0025 * num));
                                            break;
                                        case 1:
                                            base.枪_运气疗伤 = 0.01 * num;
                                            break;
                                        case 2:
                                            base.连打几率 = (20.0 + num) * 0.01;
                                            break;
                                        case 3:
                                            base.致命一击几率 = (10.0 + num) * 0.01;
                                            break;
                                        case 4:
                                            人物_气功_追加SP时间 = (int)(num * 0.5);
                                            break;
                                        case 5:
                                            人物_气功_追加_HP = (int)((double)人物基本最大_HP * (0.005 * num));
                                            break;
                                        case 6:
                                            FLD_人物_气功_武功攻击力增加百分比 = World.枪客乾坤挪移 * num;
                                            break;
                                        case 7:
                                            if (Player_Job_leve > 3)
                                            {
                                                FLD_人物_气功_武功防御力增加百分比 = World.灵甲护身加成 * World.枪客灵甲护身 * num;
                                            }
                                            else
                                            {
                                                FLD_人物_气功_武功防御力增加百分比 = World.枪客灵甲护身 * num;
                                            }
                                            break;
                                        case 8:
                                            base.枪_狂神降世 = 0.002 * num;
                                            break;
                                        case 9:
                                            base.枪_转攻为守 = num * 0.0125;
                                            break;
                                        case 10:
                                            base.枪_末日狂舞 = num * World.枪客末日狂舞;
                                            break;
                                    }
                                    break;
                                case 4:
                                    switch (i)
                                    {
                                        case 0:
                                            FLD_人物_气功_命中 = (int)(2.0 * num);
                                            break;
                                        case 2:
                                            FLD_人物_气功_攻击 = (int)num;
                                            base.弓_凝神聚气 = 0.005 * num;
                                            break;
                                        case 3:
                                            base.致命一击几率 = (10.0 + num) * 0.01;
                                            break;
                                        case 4:
                                            人物_气功_追加SP时间 = (int)(num * 0.5);
                                            break;
                                        case 5:
                                            人物_气功_追加_HP = (int)(8.0 * num);
                                            break;
                                        case 6:
                                            base.弓_心神凝聚 = num * 0.0075;
                                            break;
                                        case 7:
                                            base.弓_流星三矢 = num * 0.005;
                                            break;
                                        case 8:
                                            base.弓_锐利之箭 = num * 0.015;
                                            break;
                                        case 9:
                                            base.弓_无明暗矢 = num * 0.015;
                                            break;
                                        case 10:
                                            base.弓_致命绝杀 = (15.0 + num) * 0.01;
                                            break;
                                    }
                                    break;
                                case 5:
                                    switch (i)
                                    {
                                        case 0:
                                            base.医_运气疗心 = 0.02 * num;
                                            break;
                                        case 1:
                                            base.医_运气行心 = 0.012 * num;
                                            break;
                                        case 2:
                                            人物_气功_追加_HP = (int)((double)人物基本最大_HP * (0.005 * num));
                                            break;
                                        case 3:
                                            人物_气功_追加_MP = (int)((double)人物基本最大_MP * (0.001 * num));
                                            break;
                                        case 4:
                                            base.医_妙手回春 = 0.15 * num;
                                            break;
                                        case 5:
                                            base.医_长攻击力 = 0.015 * num;
                                            break;
                                        case 6:
                                            base.医_吸星大法 = 0.05 * num;
                                            break;
                                        case 7:
                                            base.医_神农仙术 = 0.01 * num;
                                            break;
                                        case 8:
                                            base.医_天佑之气 = num * 0.012;
                                            break;
                                        case 9:
                                            base.医_九天真气 = 0.001 * num;
                                            break;
                                        case 10:
                                            base.医_万物回春 = num * 0.01;
                                            break;
                                    }
                                    break;
                            }
                        }
                    }
                }
            }
        }

        private int 得到气功ID(int i)
        {
            if (i >= 10)
            {
                if (Player_Job == 8)
                {
                    return 260;
                }
                if (Player_Job >= 6)
                {
                    return Player_Job * 10 + 100 + 10;
                }
                return Player_Job * 10 + 100;
            }
            if (Player_Job == 8)
            {
                return i + 250;
            }
            if (Player_Job >= 6)
            {
                return i + 10 * Player_Job + 10;
            }
            return i + 10 * Player_Job;
        }

        public void 读出人物数据()
        {
            try
            {
                if (World.jlMsg == 1)
                {
                    Form1.WriteLine(0, "PlayersBes_读出人物数据()");
                }
                Clear();
                string sqlCommand = string.Format("select * from [TBL_人物数据] where FLD_ID=@Userid and FLD_NAME =@Username");
                SqlParameter[] prams = new SqlParameter[2]
                {
                SqlDBA.MakeInParam("@Userid", SqlDbType.VarChar, 30, Userid),
                SqlDBA.MakeInParam("@Username", SqlDbType.VarChar, 30, UserName)
                };
                DataTable dBToDataTable = DBA.GetDBToDataTable(sqlCommand, prams);
                if (dBToDataTable.Rows.Count == 0 && Client != null)
                {
                    Client.Dispose();
                }
                GM模式 = (int)dBToDataTable.Rows[0]["FLD_J9"];
                人物位置 = (int)dBToDataTable.Rows[0]["FLD_INDEX"];
                _人物历练 = (int)dBToDataTable.Rows[0]["FLD_FIGHT_EXP"];
                _人物经验 = long.Parse(dBToDataTable.Rows[0]["FLD_EXP"].ToString());
                try
                {
                    _人物钱数 = int.Parse(dBToDataTable.Rows[0]["FLD_MONEY"].ToString());
                }
                catch
                {
                    _人物钱数 = 0;
                }
                _人物没加气功点 = (int)dBToDataTable.Rows[0]["FLD_POINT"];
                _人物正邪 = (int)dBToDataTable.Rows[0]["FLD_ZX"];
                势力战临时正邪值 = _人物正邪;
                _人物等级 = (int)dBToDataTable.Rows[0]["FLD_LEVEL"];
                _冲级奖励 = (int)dBToDataTable.Rows[0]["FLD_SJJL"];
                _人物职业 = (int)dBToDataTable.Rows[0]["FLD_JOB"];
                _人物职业等级 = (int)dBToDataTable.Rows[0]["FLD_JOB_LEVEL"];
                _FLD_VIP_攻击 = (int)dBToDataTable.Rows[0]["FLD_VIP_AT"] / 2;
                _FLD_VIP_防御 = (int)dBToDataTable.Rows[0]["FLD_VIP_DF"] / 2;
                _人物_VIP_HP = (int)dBToDataTable.Rows[0]["FLD_VIP_HP"] / 2;
                _人物会员等级 = (int)dBToDataTable.Rows[0]["FLD_VIP_LEVEL"];
                _人物任务级别 = (int)dBToDataTable.Rows[0]["FLD_任务等级"];
                _护心丹使用时间 = (int)dBToDataTable.Rows[0]["FLD_护心丹使用"];
                New人物模版 = new 人物模板类((byte[])dBToDataTable.Rows[0]["FLD_FACE"]);
                _人物名字模版 = (byte[])dBToDataTable.Rows[0]["FLD_NAMETYPE"];
                _人物性别 = New人物模版.性别;
                _人物_HP = (int)dBToDataTable.Rows[0]["FLD_HP"];
                _人物_MP = (int)dBToDataTable.Rows[0]["FLD_MP"];
                _人物_SP = (int)dBToDataTable.Rows[0]["FLD_SP"];
                _人物坐标_X = float.Parse(dBToDataTable.Rows[0]["FLD_X"].ToString());
                _人物坐标_Y = float.Parse(dBToDataTable.Rows[0]["FLD_Y"].ToString());
                _人物坐标_Z = float.Parse(dBToDataTable.Rows[0]["FLD_Z"].ToString());
                _等级锁定状态 = (int)dBToDataTable.Rows[0]["FLD_ZBVER"];
                _人物坐标_地图 = (int)dBToDataTable.Rows[0]["FLD_MENOW"];
                目标坐标X = _人物坐标_X;
                目标坐标Y = _人物坐标_Y;
                if ((_人物性别 < 1 || _人物性别 > 2) && Client != null)
                {
                    Client.Dispose();
                }
                this.FLD_情侣 = dBToDataTable.Rows[0]["FLD_QlNAME"].ToString();
                string sqlQL = string.Format("select * from [TBL_人物数据] where FLD_QlNAME =@Username");
                if (this.FLD_情侣 != "")
                {
                    SqlParameter[] pramsQl = {
                        DbClss.SqlDBA.MakeInParam("@Username", SqlDbType.VarChar, 30, this.FLD_情侣)
                    };
                    DataTable tableQl = DbClss.DBA.GetDBToDataTable(sqlQL, pramsQl);
                    if (tableQl.Rows.Count == 0)
                    {
                        this.FLD_情侣 = "";
                        //this.FLD_情侣_爱情度 = 0;
                    }
                    tableQl.Dispose();
                }
                新坐标 = new 坐标Class(人物坐标_X, 人物坐标_Y, 人物坐标_Z, 人物坐标_地图);
                Player_WuXun = (int)dBToDataTable.Rows[0]["FLD_WX"];
                人物善恶 = (int)dBToDataTable.Rows[0]["FLD_SE"];
                人物轻功 = (int)dBToDataTable.Rows[0]["FLD_JQ"];
                副本次数 = (int)dBToDataTable.Rows[0]["FLD_副本次数"];
                BOSS次数 = (int)dBToDataTable.Rows[0]["FLD_BOSS次数"];
                签名类型 = (int)dBToDataTable.Rows[0]["FLD_签名类型"];
                个性签名 = dBToDataTable.Rows[0]["FLD_个性签名"].ToString();
                客户端设置 = dBToDataTable.Rows[0]["FLD_CONFIG"].ToString();
                if (Player_ExpErience < 0)
                {
                    Player_ExpErience = 10000000;
                }
                if (Player_Qigong_point < 0)
                {
                    Player_Qigong_point = 0;
                }
                师傅数据.TID = -1;
                for (int i = 0; i < 3; i++)
                {
                    徒弟数据[i] = new 师徒类();
                    徒弟数据[i].TID = -1;
                }
                DataTable dataTable = RxjhClass.得到师傅数据(UserName);
                if (dataTable != null)
                {
                    师傅数据.TID = (int)dataTable.Rows[0]["FLD_INDEX"];
                    师傅数据.STNAME = dataTable.Rows[0]["FLD_SNAME"].ToString();
                    师傅数据.TLEVEL = (int)dataTable.Rows[0]["FLD_TLEVEL"];
                    师傅数据.STLEVEL = (int)dataTable.Rows[0]["FLD_STLEVEL"];
                    师傅数据.STYHD = (int)dataTable.Rows[0]["FLD_STYHD"];
                    if (师傅数据.STYHD > 16)
                    {
                        师傅数据.STYHD = 16;
                    }
                    师傅数据.STWG1 = (int)dataTable.Rows[0]["FLD_STWG1"];
                    师傅数据.STWG2 = (int)dataTable.Rows[0]["FLD_STWG2"];
                    师傅数据.STWG3 = (int)dataTable.Rows[0]["FLD_STWG3"];
                    dataTable.Dispose();
                }
                else
                {
                    DataTable dataTable2 = RxjhClass.得到徒弟数据(UserName);
                    if (dataTable2 != null)
                    {
                        for (int j = 0; j < dataTable2.Rows.Count; j++)
                        {
                            int num = (int)dataTable2.Rows[j]["FLD_INDEX"];
                            if (num <= 2)
                            {
                                徒弟数据[num].TID = (int)dataTable2.Rows[j]["FLD_INDEX"];
                                徒弟数据[num].STNAME = dataTable2.Rows[j]["FLD_TNAME"].ToString();
                                徒弟数据[num].TLEVEL = (int)dataTable2.Rows[j]["FLD_TLEVEL"];
                                徒弟数据[num].STLEVEL = (int)dataTable2.Rows[j]["FLD_STLEVEL"];
                                徒弟数据[num].STYHD = (int)dataTable2.Rows[j]["FLD_STYHD"];
                                徒弟数据[num].STWG1 = (int)dataTable2.Rows[j]["FLD_STWG1"];
                                徒弟数据[num].STWG2 = (int)dataTable2.Rows[j]["FLD_STWG2"];
                                徒弟数据[num].STWG3 = (int)dataTable2.Rows[j]["FLD_STWG3"];
                            }
                        }
                        dataTable2.Dispose();
                    }
                }
                byte[] array = new byte[20];
                byte[] array2 = (byte[])dBToDataTable.Rows[0]["FLD_SKILLS"];
                Buffer.BlockCopy(array2, 0, array, 0, array2.Length);
                for (int k = 0; k < 15; k++)
                {
                    byte[] array3 = new byte[2];
                    try
                    {
                        if (array.Length > k + 1)
                        {
                            Buffer.BlockCopy(array, k, array3, 0, 1);
                        }
                    }
                    catch (Exception)
                    {
                    }
                    气功[k] = new 气功类(array3);
                    switch (k)
                    {
                        case 5:
                            if (Player_Level >= 10 && Player_Job_leve >= 1)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                                if (气功[k].气功量 == 255)
                                {
                                    气功[k].气功量 = 0;
                                }
                            }
                            break;
                        case 6:
                            if (Player_Level >= 35 && Player_Job_leve >= 2)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                                if (气功[k].气功量 == 255)
                                {
                                    气功[k].气功量 = 0;
                                }
                            }
                            break;
                        case 7:
                            if (Player_Level >= 60 && Player_Job_leve >= 3)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                                if (气功[k].气功量 == 255)
                                {
                                    气功[k].气功量 = 0;
                                }
                            }
                            break;
                        case 8:
                            if (Player_Level >= 80 && Player_Job_leve >= 4)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                                if (气功[k].气功量 == 255)
                                {
                                    气功[k].气功量 = 0;
                                }
                            }
                            break;
                        case 9:
                            if (Player_Level >= 90 && Player_Job_leve >= 4)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                                if (气功[k].气功量 == 255)
                                {
                                    气功[k].气功量 = 0;
                                }
                            }
                            break;
                        case 10:
                            if (Player_Level >= 100 && Player_Job_leve >= 5)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                                if (气功[k].气功量 == 255)
                                {
                                    气功[k].气功量 = 0;
                                }
                            }
                            break;
                        default:
                            if (k < 11)
                            {
                                气功[k].气功ID = 得到气功ID(k);
                            }
                            break;
                    }
                }
                int num2 = 0;
                for (int l = 0; l < 11; l++)
                {
                    byte[] 气功_byte = 气功[l].气功_byte;
                    int num3 = BitConverter.ToInt16(气功_byte, 0);
                    if (气功_byte[0] != byte.MaxValue)
                    {
                        num2 += num3;
                    }
                }
                int num4;
                if (Player_Level > 34)
                {
                    num4 = 34;
                    int num5 = Player_Level - 35;
                    num4 += num5 * 2;
                }
                else
                {
                    num4 = Player_Level - 1;
                }
                if (num2 + Player_Qigong_point != num4)
                {
                    if (num2 > num4 - Player_Qigong_point)
                    {
                        Player_Qigong_point = num4;
                        for (int m = 0; m < 12; m++)
                        {
                            int num6 = BitConverter.ToInt16(气功[m].气功_byte, 0);
                            if (num6 != 255)
                            {
                                气功[m].气功_byte = new byte[2];
                            }
                        }
                    }
                    else
                    {
                        Player_Qigong_point = num4 - num2;
                    }
                }
                byte[] array4 = (byte[])dBToDataTable.Rows[0]["FLD_KONGFU"];
                for (int n = 0; n < 78; n++)
                {
                    try
                    {
                        if (array4.Length >= n * 8 + 8)
                        {
                            int num7 = BitConverter.ToInt32(array4, n * 8);
                            if (num7 != 0)
                            {
                                武功类 武功类 = new 武功类(num7);
                                if ((武功类.FLD_JOB == 0 || Player_Job == 武功类.FLD_JOB) && (武功类.FLD_ZX == 0 || Player_Zx == 武功类.FLD_ZX) && Player_Job_leve >= 武功类.FLD_JOBLEVEL && Player_Level >= 武功类.FLD_LEVEL)
                                {
                                    武功新[武功类.FLD_武功类型, 武功类.FLD_INDEX] = 武功类;
                                }
                            }
                            continue;
                        }
                    }
                    catch
                    {
                        continue;
                    }
                    break;
                }
                if (武功新[1, 2] != null)
                {
                    人物轻功 = 2;
                }
                else if (武功新[1, 1] != null)
                {
                    人物轻功 = 1;
                }
                byte[] array5 = (byte[])dBToDataTable.Rows[0]["FLD_QITEM"];
                for (int num8 = 0; num8 < 36; num8++)
                {
                    byte[] array6 = new byte[8];
                    if (array5.Length >= num8 * 8 + 8)
                    {
                        try
                        {
                            Buffer.BlockCopy(array5, num8 * 8, array6, 0, 8);
                        }
                        catch (Exception arg)
                        {
                            Console.WriteLine(num8 + " " + arg);
                        }
                    }
                    任务物品[num8] = new 任务物品类(array6);
                }
                byte[] array7 = (byte[])dBToDataTable.Rows[0]["FLD_ITEM"];
                for (int num9 = 0; num9 < 66; num9++)
                {
                    byte[] array8 = new byte[37];
                    if (array7.Length >= num9 * 37 + 37)
                    {
                        try
                        {
                            Buffer.BlockCopy(array7, num9 * 37, array8, 0, 37);
                        }
                        catch (Exception arg2)
                        {
                            Console.WriteLine(num9 + " " + arg2);
                        }
                    }
                    装备栏包裹[num9] = new 物品类(array8, num9);
                    _人物负重 += 装备栏包裹[num9].物品总重量;
                }
                byte[] array9 = (byte[])dBToDataTable.Rows[0]["FLD_WEARITEM"];
                for (int num10 = 0; num10 < 15; num10++)
                {
                    byte[] array10 = new byte[37];
                    if (array9.Length >= num10 * 37 + 37)
                    {
                        try
                        {
                            Buffer.BlockCopy(array9, num10 * 37, array10, 0, 37);
                        }
                        catch (Exception arg3)
                        {
                            Console.WriteLine(num10 + " " + arg3);
                        }
                    }
                    装备栏已穿装备[num10] = new 物品类(array10, num10);
                }
                byte[] array11 = (byte[])dBToDataTable.Rows[0]["FLD_QUEST"];
                for (int num11 = 0; num11 < 100; num11++)
                {
                    byte[] array12 = new byte[4];
                    try
                    {
                        if (array11.Length >= num11 * 4 + 4)
                        {
                            Buffer.BlockCopy(array11, num11 * 4, array12, 0, 4);
                            任务类 任务类 = new 任务类(array12);
                            if (任务类.任务ID != 0 && !任务.ContainsKey(任务类.任务ID))
                            {
                                任务.Add(任务类.任务ID, 任务类);
                            }
                            continue;
                        }
                    }
                    catch (Exception value)
                    {
                        Console.WriteLine(value);
                        continue;
                    }
                    break;
                }
                DataTable userWarehouse = RxjhClass.GetUserWarehouse(Userid, UserName);
                if (userWarehouse == null && Client != null)
                {
                    Client.Dispose();
                }
                byte[] array13 = (byte[])userWarehouse.Rows[0]["FLD_ITEM"];
                try
                {
                    个人仓库钱数 = int.Parse(userWarehouse.Rows[0]["FLD_MONEY"].ToString());
                }
                catch
                {
                    个人仓库钱数 = 0;
                }
                for (int num12 = 0; num12 < 60; num12++)
                {
                    byte[] array14 = new byte[37];
                    if (array13.Length >= num12 * 37 + 37)
                    {
                        try
                        {
                            Buffer.BlockCopy(array13, num12 * 37, array14, 0, 37);
                        }
                        catch (Exception value2)
                        {
                            Console.WriteLine(value2);
                        }
                    }
                    个人仓库[num12] = new 物品类(array14, num12);
                }
                userWarehouse.Dispose();
                DataTable userPublicWarehouse = RxjhClass.GetUserPublicWarehouse(Userid);
                if (userPublicWarehouse == null && Client != null)
                {
                    Client.Dispose();
                }
                byte[] array15 = (byte[])userPublicWarehouse.Rows[0]["FLD_ITEM"];
                综合仓库装备数据版本 = (int)userPublicWarehouse.Rows[0]["FLD_ZBVER"];
                try
                {
                    综合仓库钱数 = int.Parse(userPublicWarehouse.Rows[0]["FLD_MONEY"].ToString());
                }
                catch
                {
                    综合仓库钱数 = 0;
                }
                for (int num13 = 0; num13 < 60; num13++)
                {
                    byte[] array16 = new byte[37];
                    if (array15.Length >= num13 * 37 + 37)
                    {
                        try
                        {
                            Buffer.BlockCopy(array15, num13 * 37, array16, 0, 37);
                        }
                        catch (Exception value3)
                        {
                            Console.WriteLine(value3);
                        }
                    }
                    公共仓库[num13] = new 物品类(array16, num13);
                }
                传书列表.Clear();
                DataTable dataTable3 = RxjhClass.得到传书列表(UserName);
                if (dataTable3 != null)
                {
                    for (int num14 = 0; num14 < dataTable3.Rows.Count; num14++)
                    {
                        个人传书类 个人传书类 = new 个人传书类();
                        个人传书类.传书ID = (int)dataTable3.Rows[num14]["ID"];
                        个人传书类.是否NPC = (int)dataTable3.Rows[num14]["发送NPC"];
                        个人传书类.传书发送人 = dataTable3.Rows[num14]["发送人物名"].ToString();
                        个人传书类.传书内容 = dataTable3.Rows[num14]["传书内容"].ToString();
                        个人传书类.传书时间 = DateTime.Parse(dataTable3.Rows[num14]["传书时间"].ToString());
                        个人传书类.是否已读 = (int)dataTable3.Rows[num14]["阅读标识"];
                        传书列表.Add(个人传书类.传书ID, 个人传书类);
                    }
                    dataTable3.Dispose();
                    RxjhClass.删除传书列表(UserName);
                }
                五色神丹 = null;
                if (!dBToDataTable.Rows[0]["FLD_CTIME"].Equals(null))
                {
                    五色神丹 = (byte[])dBToDataTable.Rows[0]["FLD_CTIME"];
                }
                if (!dBToDataTable.Rows[0]["FLD_CTIMENEW"].Equals(null))
                {
                    追加状态物品 = (byte[])dBToDataTable.Rows[0]["FLD_CTIMENEW"];
                }
                byte[] src = (byte[])userPublicWarehouse.Rows[0]["FLD_ITIME"];
                byte[] array17 = new byte[16];
                Buffer.BlockCopy(src, 0, array17, 0, 16);
                for (int num15 = 0; num15 < 2; num15++)
                {
                    try
                    {
                        byte[] array18 = new byte[4];
                        byte[] array19 = new byte[4];
                        Buffer.BlockCopy(array17, num15 * 8, array18, 0, 4);
                        Buffer.BlockCopy(array17, num15 * 8 + 4, array19, 0, 4);
                        DateTime t = new DateTime(1970, 1, 1, 8, 0, 0).AddSeconds(BitConverter.ToInt32(array19, 0));
                        if (!(t < DateTime.Now))
                        {
                            if (BitConverter.ToInt32(array18, 0) <= 0)
                            {
                                break;
                            }
                            if (!公有药品.ContainsKey(BitConverter.ToInt32(array18, 0)))
                            {
                                公有药品类 公有药品类 = new 公有药品类();
                                公有药品类.药品ID = BitConverter.ToInt32(array18, 0);
                                公有药品类.时间 = BitConverter.ToInt32(array19, 0);
                                公有药品.Add(公有药品类.药品ID, 公有药品类);
                            }
                        }
                    }
                    catch (Exception value4)
                    {
                        Console.WriteLine(value4);
                    }
                }
                byte[] array20 = null;
                if (dBToDataTable.Rows[0]["FLD_DOORS"] != null)
                {
                    array20 = (byte[])dBToDataTable.Rows[0]["FLD_DOORS"];
                }
                土灵符坐标.Clear();
                if (array20.Length >= 128)
                {
                    for (int num16 = 0; num16 < 30; num16++)
                    {
                        try
                        {
                            byte[] array21 = new byte[4];
                            byte[] array22 = new byte[4];
                            byte[] array23 = new byte[4];
                            byte[] array24 = new byte[4];
                            byte[] array25 = new byte[14];
                            Buffer.BlockCopy(array20, num16 * 32 + 15, array24, 0, 4);
                            Buffer.BlockCopy(array20, num16 * 32 + 19, array21, 0, 4);
                            Buffer.BlockCopy(array20, num16 * 32 + 23, array22, 0, 4);
                            Buffer.BlockCopy(array20, num16 * 32 + 27, array23, 0, 4);
                            Buffer.BlockCopy(array20, num16 * 32, array25, 0, 14);
                            string @string = Encoding.Default.GetString(array25);
                            if (BitConverter.ToSingle(array21, 0) != 0f || BitConverter.ToSingle(array22, 0) != 0f || BitConverter.ToInt32(array24, 0) != 0)
                            {
                                坐标Class 坐标Class = new 坐标Class(BitConverter.ToSingle(array21, 0), BitConverter.ToSingle(array22, 0), BitConverter.ToSingle(array23, 0), BitConverter.ToInt32(array24, 0));
                                坐标Class.Rxjh_name = @string;
                                if (土灵符坐标.ContainsKey(10 + num16))
                                {
                                    土灵符坐标.Remove(10 + num16);
                                }
                                土灵符坐标.Add(10 + num16, 坐标Class);
                            }
                        }
                        catch (Exception)
                        {
                        }
                    }
                }
                DataTable userNameBp = RxjhClass.GetUserNameBp(UserName);
                if (userNameBp != null)
                {
                    帮派Id = (int)userNameBp.Rows[0]["Id"];
                    帮派名字 = userNameBp.Rows[0]["G_Name"].ToString();
                    帮派人物等级 = (int)userNameBp.Rows[0]["leve"];
                    帮派门服字 = (int)userNameBp.Rows[0]["门服字"];
                    帮派门服颜色 = (int)userNameBp.Rows[0]["门服颜色"];
                    try
                    {
                        if (userNameBp.Rows[0]["Mh"] != DBNull.Value)
                        {
                            帮派门徽 = (byte[])userNameBp.Rows[0]["Mh"];
                        }
                    }
                    catch (Exception value5)
                    {
                        Console.WriteLine(value5);
                    }
                    userNameBp.Dispose();
                    DataTable dataTable4 = RxjhClass.得到帮派数据(帮派名字);
                    if (dataTable4 != null)
                    {
                        帮派等级 = int.Parse(dataTable4.Rows[0]["Leve"].ToString());
                        dataTable4.Dispose();
                    }
                }
                计算人物基本数据();
                dBToDataTable.Dispose();
                userPublicWarehouse.Dispose();
                综合仓库装备数据版本 = 1;
            }
            catch (Exception ex3)
            {
                Form1.WriteLine(2, "读出人物数据出错 " + Userid + "  " + ex3.Message);
                logo.KickTxtLog(Userid + "|" + UserName + "读出人物数据出错" + ex3.Message);
                OpClient(1);
                Client.Dispose();
            }
        }

        public void 读帮派数据()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_读帮派数据()");
            }
            DataTable userNameBp = RxjhClass.GetUserNameBp(UserName);
            if (userNameBp != null)
            {
                帮派Id = (int)userNameBp.Rows[0]["Id"];
                帮派名字 = userNameBp.Rows[0]["G_Name"].ToString();
                帮派人物等级 = (int)userNameBp.Rows[0]["leve"];
                帮派门服字 = (int)userNameBp.Rows[0]["门服字"];
                帮派门服颜色 = (int)userNameBp.Rows[0]["门服颜色"];
                try
                {
                    if (userNameBp.Rows[0]["Mh"] != DBNull.Value)
                    {
                        帮派门徽 = (byte[])userNameBp.Rows[0]["Mh"];
                    }
                }
                catch (Exception)
                {
                }
                userNameBp.Dispose();
                DataTable dataTable = RxjhClass.得到帮派数据(帮派名字);
                if (dataTable != null)
                {
                    帮派等级 = int.Parse(dataTable.Rows[0]["Leve"].ToString());
                    dataTable.Dispose();
                }
            }
            else
            {
                帮派Id = 0;
                帮派名字 = string.Empty;
                帮派人物等级 = 0;
                帮派门徽 = null;
            }
        }

        public void 计算人物装备数据()
        {
            using (new Lock(thisLock, "计算人物装备数据"))
            {
                FLD_装备_追加_刀客暗影绝杀 = 0;
                FLD_装备_追加_刀客力劈华山 = 0;
                FLD_装备_追加_刀客霸气破甲 = 0;
                FLD_装备_追加_刀客必杀一击 = 0;
                FLD_装备_追加_刀客狂风万破 = 0;
                FLD_装备_追加_刀客连环飞舞 = 0;
                FLD_装备_追加_刀客摄魂一击 = 0;
                FLD_装备_追加_刀客四两千斤 = 0;
                FLD_装备_追加_刀客稳如泰山 = 0;
                FLD_装备_追加_刀客真武绝击 = 0;
                FLD_装备_追加_剑客怒海狂澜 = 0;
                FLD_装备_追加_剑客长虹贯日 = 0;
                FLD_装备_追加_剑客百变神行 = 0;
                FLD_装备_追加_剑客连环飞舞 = 0;
                FLD_装备_追加_剑客必杀一击 = 0;
                FLD_装备_追加_剑客狂风万破 = 0;
                FLD_装备_追加_剑客护身罡气 = 0;
                FLD_装备_追加_剑客移花接木 = 0;
                FLD_装备_追加_剑客回柳身法 = 0;
                FLD_装备_追加_剑客冲冠一怒 = 0;
                FLD_装备_追加_枪客狂神降世 = 0;
                FLD_装备_追加_枪客金钟罩气 = 0;
                FLD_装备_追加_枪客运气疗伤 = 0;
                FLD_装备_追加_枪客连环飞舞 = 0;
                FLD_装备_追加_枪客必杀一击 = 0;
                FLD_装备_追加_枪客狂风万破 = 0;
                FLD_装备_追加_枪客横练太保 = 0;
                FLD_装备_追加_枪客乾坤挪移 = 0;
                FLD_装备_追加_枪客灵甲护身 = 0;
                FLD_装备_追加_枪客转守为攻 = 0;
                FLD_装备_追加_弓百步穿杨 = 0;
                FLD_装备_追加_弓锐利之箭 = 0;
                FLD_装备_追加_弓猎鹰之眼 = 0;
                FLD_装备_追加_弓凝神聚气 = 0;
                FLD_装备_追加_弓必杀一击 = 0;
                FLD_装备_追加_弓狂风万破 = 0;
                FLD_装备_追加_弓正本培元 = 0;
                FLD_装备_追加_弓心神凝聚 = 0;
                FLD_装备_追加_弓流星三矢 = 0;
                FLD_装备_追加_弓无明暗矢 = 0;
                FLD_装备_追加_医体血倍增 = 0;
                FLD_装备_追加_医天佑之气 = 0;
                FLD_装备_追加_医运气行心 = 0;
                FLD_装备_追加_医太极心法 = 0;
                FLD_装备_追加_医洗髓易经 = 0;
                FLD_装备_追加_医妙手回春 = 0;
                FLD_装备_追加_医长功攻击 = 0;
                FLD_装备_追加_医吸星大法 = 0;
                FLD_装备_追加_医神农仙术 = 0;
                FLD_装备_追加_医九天真气 = 0;
                FLD_装备_追加_合成成功率百分比 = 0.0;
                FLD_装备_追加_获得游戏币百分比 = 0.0;
                FLD_装备_武功攻击力增加百分比 = 0.0;
                FLD_装备_武功防御力增加百分比 = 0.0;
                FLD_装备_追加_攻击 = 0;
                FLD_装备_追加_防御 = 0;
                FLD_装备_追加_命中 = 0;
                FLD_装备_追加_回避 = 0;
                FLD_装备_追加_怒气 = 0;
                FLD_装备_追加_气功 = 0;
                FLD_装备_追加_经验百分比 = 0.0;
                FLD_装备_追加_HP = 0;
                FLD_装备_追加_MP = 0;
                FLD_装备_追加_追伤 = 0;
                减免对方伤害 = 0;
                try
                {
                    for (int i = 0; i < 15; i++)
                    {
                        if (i == 13)
                        {
                            if (装备栏已穿装备[i].Get物品ID == 900102 && 帮派等级 < 4)
                            {
                                系统提示("必须加入门派并且门派等级不小于4级佩戴才有效果", 9, "系统提示");
                                continue;
                            }
                            if (装备栏已穿装备[i].Get物品ID == 900103 && 帮派等级 < 5)
                            {
                                系统提示("必须加入门派并且门派等级不小于5级佩戴才有效果", 9, "系统提示");
                                continue;
                            }
                            if (装备栏已穿装备[i].Get物品ID == 900104 && 帮派等级 < 6)
                            {
                                系统提示("必须加入门派并且门派等级不小于6级佩戴才有效果", 9, "系统提示");
                                continue;
                            }
                        }
                        装备栏已穿装备[i].得到物品属性方法();
                        if (装备栏已穿装备[i].FLD_LEVEL <= Player_Level)
                        {
                            FLD_装备_追加_攻击 += (装备栏已穿装备[i].物品攻击力 + 装备栏已穿装备[i].物品攻击力MAX) / 2;
                            FLD_装备_追加_防御 += 装备栏已穿装备[i].物品防御力;
                            减免对方伤害 += 装备栏已穿装备[i].物品属性_防御力增加;
                            FLD_装备_追加_命中 += 装备栏已穿装备[i].物品属性_命中率增加;
                            FLD_装备_追加_回避 += 装备栏已穿装备[i].物品属性_回避率增加;
                            double num = 装备栏已穿装备[i].物品属性_武功攻击力;
                            double num2 = 装备栏已穿装备[i].物品属性_武功防御力增加;
                            FLD_装备_武功攻击力增加百分比 += num / World.武功攻击力控制;
                            FLD_装备_武功防御力增加百分比 += num2 / World.武功防御力控制;
                            FLD_装备_追加_气功 += 装备栏已穿装备[i].物品属性_全部气功等级增加;
                            FLD_装备_追加_HP += 装备栏已穿装备[i].物品属性_生命力增加;
                            FLD_装备_追加_MP += 装备栏已穿装备[i].物品属性_内功力增加;
                            FLD_装备_追加_合成成功率百分比 += (double)装备栏已穿装备[i].物品属性_升级成功率 / 100.0;
                            FLD_装备_追加_追伤 += 装备栏已穿装备[i].物品属性_追加伤害值;
                            FLD_装备_追加_获得游戏币百分比 += (double)装备栏已穿装备[i].物品属性_获得金钱增加 / 150.0;
                            FLD_装备_追加_经验百分比 += (double)装备栏已穿装备[i].物品属性_经验获得增加 / 100.0;
                            FLD_装备_追加_死亡损失经验减少 += (double)装备栏已穿装备[i].物品属性_死亡损失经验减少 / 100.0;
                            if (装备栏已穿装备[i].FLD_RESIDE2 == 1 || 装备栏已穿装备[i].FLD_RESIDE2 == 2 || 装备栏已穿装备[i].FLD_RESIDE2 == 5 || 装备栏已穿装备[i].FLD_RESIDE2 == 6)
                            {
                                if (装备栏已穿装备[i].FLD_RESIDE2 == 1)
                                {
                                    switch (装备栏已穿装备[i].物品属性阶段类型)
                                    {
                                        case 2:
                                            FLD_装备_追加_怒气 += 装备栏已穿装备[i].物品属性阶段数;
                                            break;
                                        case 3:
                                            FLD_装备_追加_回避 += (int)((double)FLD_回避 * ((double)装备栏已穿装备[i].物品属性阶段数 * 0.01));
                                            break;
                                        case 4:
                                            FLD_装备_武功防御力增加百分比 += (double)装备栏已穿装备[i].物品属性阶段数 * 0.005;
                                            break;
                                        case 5:
                                            FLD_装备_追加_防御 += 装备栏已穿装备[i].物品属性阶段数 * 3;
                                            break;
                                    }
                                }
                                if (装备栏已穿装备[i].FLD_RESIDE2 == 6)
                                {
                                    if (装备栏已穿装备[i].FLD_强化数量 > 5)
                                    {
                                        switch (装备栏已穿装备[i].FLD_强化数量)
                                        {
                                            case 10:
                                                FLD_装备_追加_HP += 300;
                                                break;
                                            case 9:
                                                FLD_装备_追加_HP += 200;
                                                break;
                                            case 8:
                                                FLD_装备_追加_HP += 140;
                                                break;
                                            case 7:
                                                FLD_装备_追加_HP += 80;
                                                break;
                                            case 6:
                                                FLD_装备_追加_HP += 40;
                                                break;
                                        }
                                    }
                                }
                                else if (装备栏已穿装备[i].FLD_强化数量 > 5)
                                {
                                    int num3 = 装备栏已穿装备[i].FLD_强化数量 + FLD_装备_追加_防具_强化;
                                    if (装备栏已穿装备[i].FLD_LEVEL < 60)
                                    {
                                        FLD_装备_追加_HP += (num3 - 5) * 5;
                                    }
                                    else if (num3 < 10)
                                    {
                                        减免对方伤害 += (num3 - 5) * 5;
                                    }
                                    else
                                    {
                                        FLD_装备_追加_防御 += (num3 - 9) * 3;
                                        减免对方伤害 += (num3 - 5) * 5;
                                        减免对方伤害 += (num3 - 9) * 5;
                                    }
                                }
                                FLD_装备_追加_防御 += FLD_装备_追加_防具_强化 * 12;
                            }
                            else if (装备栏已穿装备[i].FLD_RESIDE2 == 4)
                            {
                                if (装备栏已穿装备[i].Get物品ID == 101200001 || 装备栏已穿装备[i].Get物品ID == 201200001 || 装备栏已穿装备[i].Get物品ID == 301200001 || 装备栏已穿装备[i].Get物品ID == 401200001 || 装备栏已穿装备[i].Get物品ID == 501200001 || 装备栏已穿装备[i].Get物品ID == 701200001 || 装备栏已穿装备[i].Get物品ID == 801200001)
                                {
                                    FLD_装备_追加_气功 += 3;
                                    FLD_装备_追加_经验百分比 += 0.5;
                                }
                                FLD_装备_追加_命中 += 50;
                                FLD_装备_追加_攻击 += FLD_装备_追加_武器_强化 * 12;
                                int num4 = 0;
                                int num5 = 0;
                                if (装备栏已穿装备[i].FLD_强化数量 > 5)
                                {
                                    switch (装备栏已穿装备[i].FLD_强化数量 + FLD_装备_追加_武器_强化)
                                    {
                                        case 12:
                                            FLD_装备_追加_气功 += 3;
                                            num4 = 72;
                                            num5 = 5;
                                            break;
                                        case 11:
                                            FLD_装备_追加_气功 += 2;
                                            num4 = 54;
                                            num5 = 5;
                                            break;
                                        case 10:
                                            FLD_装备_追加_气功++;
                                            num4 = 40;
                                            num5 = 5;
                                            break;
                                        case 9:
                                            num4 = 26;
                                            num5 = 5;
                                            break;
                                        case 8:
                                            num4 = 15;
                                            num5 = 5;
                                            break;
                                        case 7:
                                            num4 = 7;
                                            num5 = 4;
                                            break;
                                        case 6:
                                            num5 = 3;
                                            num4 = 2;
                                            break;
                                    }
                                }
                                FLD_装备_追加_攻击 += num4;
                                switch (装备栏已穿装备[i].物品属性阶段类型)
                                {
                                    case 3:
                                        FLD_装备_追加_命中 += (int)((double)FLD_命中 * ((double)装备栏已穿装备[i].物品属性阶段数 * 0.01));
                                        break;
                                    case 4:
                                        FLD_装备_武功攻击力增加百分比 += (double)装备栏已穿装备[i].物品属性阶段数 * 0.005;
                                        break;
                                    case 5:
                                        FLD_装备_追加_追伤 += (装备栏已穿装备[i].物品属性阶段数 + num5) * 10;
                                        break;
                                    case 6:
                                        FLD_装备_追加_攻击 += (装备栏已穿装备[i].物品属性阶段数 + num5) * 3;
                                        break;
                                }
                            }
                            else if (装备栏已穿装备[i].FLD_RESIDE2 == 12 || 装备栏已穿装备[i].FLD_RESIDE2 == 14)
                            {
                                switch (Player_Job)
                                {
                                    case 1:
                                        FLD_装备_追加_刀客暗影绝杀 += 装备栏已穿装备[i].物品属性_追加刀客暗影绝杀;
                                        FLD_装备_追加_刀客力劈华山 += 装备栏已穿装备[i].物品属性_追加刀客力劈华山;
                                        FLD_装备_追加_刀客霸气破甲 += 装备栏已穿装备[i].物品属性_追加刀客霸气破甲;
                                        FLD_装备_追加_刀客必杀一击 += 装备栏已穿装备[i].物品属性_追加刀客必杀一击;
                                        FLD_装备_追加_刀客狂风万破 += 装备栏已穿装备[i].物品属性_追加刀客狂风万破;
                                        FLD_装备_追加_刀客连环飞舞 += 装备栏已穿装备[i].物品属性_追加刀客连环飞舞;
                                        FLD_装备_追加_刀客摄魂一击 += 装备栏已穿装备[i].物品属性_追加刀客摄魂一击;
                                        FLD_装备_追加_刀客四两千斤 += 装备栏已穿装备[i].物品属性_追加刀客四两千斤;
                                        FLD_装备_追加_刀客稳如泰山 += 装备栏已穿装备[i].物品属性_追加刀客稳如泰山;
                                        FLD_装备_追加_刀客真武绝击 += 装备栏已穿装备[i].物品属性_追加刀客真武绝击;
                                        break;
                                    case 2:
                                        FLD_装备_追加_剑客怒海狂澜 += 装备栏已穿装备[i].物品属性_追加剑客怒海狂澜;
                                        FLD_装备_追加_剑客长虹贯日 += 装备栏已穿装备[i].物品属性_追加剑客长虹贯日;
                                        FLD_装备_追加_剑客百变神行 += 装备栏已穿装备[i].物品属性_追加剑客百变神行;
                                        FLD_装备_追加_剑客连环飞舞 += 装备栏已穿装备[i].物品属性_追加剑客连环飞舞;
                                        FLD_装备_追加_剑客必杀一击 += 装备栏已穿装备[i].物品属性_追加剑客必杀一击;
                                        FLD_装备_追加_剑客狂风万破 += 装备栏已穿装备[i].物品属性_追加剑客狂风万破;
                                        FLD_装备_追加_剑客护身罡气 += 装备栏已穿装备[i].物品属性_追加剑客护身罡气;
                                        FLD_装备_追加_剑客移花接木 += 装备栏已穿装备[i].物品属性_追加剑客移花接木;
                                        FLD_装备_追加_剑客回柳身法 += 装备栏已穿装备[i].物品属性_追加剑客回柳身法;
                                        FLD_装备_追加_剑客冲冠一怒 += 装备栏已穿装备[i].物品属性_追加剑客冲冠一怒;
                                        break;
                                    case 3:
                                        FLD_装备_追加_枪客狂神降世 += 装备栏已穿装备[i].物品属性_追加枪客狂神降世;
                                        FLD_装备_追加_枪客金钟罩气 += 装备栏已穿装备[i].物品属性_追加枪客金钟罩气;
                                        FLD_装备_追加_枪客运气疗伤 += 装备栏已穿装备[i].物品属性_追加枪客运气疗伤;
                                        FLD_装备_追加_枪客连环飞舞 += 装备栏已穿装备[i].物品属性_追加枪客连环飞舞;
                                        FLD_装备_追加_枪客必杀一击 += 装备栏已穿装备[i].物品属性_追加枪客必杀一击;
                                        FLD_装备_追加_枪客狂风万破 += 装备栏已穿装备[i].物品属性_追加枪客狂风万破;
                                        FLD_装备_追加_枪客横练太保 += 装备栏已穿装备[i].物品属性_追加枪客横练太保;
                                        FLD_装备_追加_枪客乾坤挪移 += 装备栏已穿装备[i].物品属性_追加枪客乾坤挪移;
                                        FLD_装备_追加_枪客灵甲护身 += 装备栏已穿装备[i].物品属性_追加枪客灵甲护身;
                                        FLD_装备_追加_枪客转守为攻 += 装备栏已穿装备[i].物品属性_追加枪客转守为攻;
                                        break;
                                    case 4:
                                        FLD_装备_追加_弓百步穿杨 += 装备栏已穿装备[i].物品属性_追加弓百步穿杨;
                                        FLD_装备_追加_弓锐利之箭 += 装备栏已穿装备[i].物品属性_追加弓锐利之箭;
                                        FLD_装备_追加_弓猎鹰之眼 += 装备栏已穿装备[i].物品属性_追加弓猎鹰之眼;
                                        FLD_装备_追加_弓凝神聚气 += 装备栏已穿装备[i].物品属性_追加弓凝神聚气;
                                        FLD_装备_追加_弓必杀一击 += 装备栏已穿装备[i].物品属性_追加弓必杀一击;
                                        FLD_装备_追加_弓狂风万破 += 装备栏已穿装备[i].物品属性_追加弓狂风万破;
                                        FLD_装备_追加_弓正本培元 += 装备栏已穿装备[i].物品属性_追加弓正本培元;
                                        FLD_装备_追加_弓心神凝聚 += 装备栏已穿装备[i].物品属性_追加弓心神凝聚;
                                        FLD_装备_追加_弓流星三矢 += 装备栏已穿装备[i].物品属性_追加弓流星三矢;
                                        FLD_装备_追加_弓无明暗矢 += 装备栏已穿装备[i].物品属性_追加弓无明暗矢;
                                        break;
                                    case 5:
                                        FLD_装备_追加_医体血倍增 += 装备栏已穿装备[i].物品属性_追加医体血倍增;
                                        FLD_装备_追加_医天佑之气 += 装备栏已穿装备[i].物品属性_追加医天佑之气;
                                        FLD_装备_追加_医运气行心 += 装备栏已穿装备[i].物品属性_追加医运气行心;
                                        FLD_装备_追加_医太极心法 += 装备栏已穿装备[i].物品属性_追加医太极心法;
                                        FLD_装备_追加_医洗髓易经 += 装备栏已穿装备[i].物品属性_追加医洗髓易经;
                                        FLD_装备_追加_医妙手回春 += 装备栏已穿装备[i].物品属性_追加医妙手回春;
                                        FLD_装备_追加_医长功攻击 += 装备栏已穿装备[i].物品属性_追加医长功攻击;
                                        FLD_装备_追加_医吸星大法 += 装备栏已穿装备[i].物品属性_追加医吸星大法;
                                        FLD_装备_追加_医神农仙术 += 装备栏已穿装备[i].物品属性_追加医神农仙术;
                                        FLD_装备_追加_医九天真气 += 装备栏已穿装备[i].物品属性_追加医九天真气;
                                        break;
                                }
                                switch (装备栏已穿装备[i].FLD_强化数量)
                                {
                                    case 10:
                                        FLD_装备_追加_攻击 += 60;
                                        FLD_装备_追加_HP += 60;
                                        break;
                                    case 9:
                                        FLD_装备_追加_攻击 += 40;
                                        FLD_装备_追加_HP += 40;
                                        break;
                                    case 8:
                                        FLD_装备_追加_攻击 += 30;
                                        FLD_装备_追加_HP += 30;
                                        break;
                                    case 7:
                                        FLD_装备_追加_攻击 += 20;
                                        FLD_装备_追加_HP += 20;
                                        break;
                                    case 6:
                                        FLD_装备_追加_攻击 += 10;
                                        FLD_装备_追加_HP += 10;
                                        break;
                                }
                            }
                        }
                    }
                }
                catch (Exception arg)
                {
                    Form1.WriteLine(100, "计算装备数据错误,错误代码 " + arg);
                }
            }
            更新气功();
        }

        public virtual void 更新HP_MP_SP()
        {
        }

        public void 计算人物基本数据3()
        {
            int player_Level = Player_Level;
            int num = Player_Level;
            long 人物经验 = this.人物经验;
            long num2 = 人物最大经验;
            人物最大经验 = (long)World.lever[Player_Level];
            int num3 = 0;
            while (Player_Level < 255)
            {
                if (人物经验 < num2)
                {
                    double num4 = this.人物经验 - Convert.ToInt64(World.lever[Player_Level - 1]);
                    if (num4 < 1.0)
                    {
                        this.人物经验 = Convert.ToInt64(World.lever[Player_Level - 1]);
                        num--;
                        long num5 = (long)World.lever[num];
                    }
                    break;
                }
                if (num3 > 270 || !Client.Running)
                {
                    return;
                }
                num++;
                if (师傅数据.TID != -1)
                {
                    Players players = World.检查玩家name(师傅数据.STNAME);
                    if (players != null && players.Player_Level < World.人物最高等级)
                    {
                        players.人物获得经验((World.lever[num] - (double)num2) / 60.0 / (double)师傅数据.TLEVEL);
                        players.更新经验和历练();
                    }
                }
                num2 = (long)World.lever[num];
                num3++;
            }
            if (num - player_Level != 0)
            {
                计算人物基本数据();
                更新HP_MP_SP();
                更新武功和状态();
            }
        }

        public void 有新传书提示()
        {
            foreach (个人传书类 value in 传书列表.Values)
            {
                if (value.是否已读 == 0)
                {
                    string hex = "AA551000010000B200010002000000000000F1A755AA";
                    byte[] array = Converter.hexStringToByte(hex);
                    Client.Send(array, array.Length);
                }
            }
        }

        public void 查看传书()
        {
            try
            {
                if (传书列表 != null)
                {
                    string hex = "AA55D201010000B20023020000";
                    string hex2 = "00000000000000000055AA";
                    byte[] array = Converter.hexStringToByte(hex);
                    byte[] array2 = Converter.hexStringToByte(hex2);
                    byte[] array3 = new byte[array.Length + array2.Length + 传书列表.Count * 32];
                    Buffer.BlockCopy(array, 0, array3, 0, array.Length);
                    Buffer.BlockCopy(array2, 0, array3, array3.Length - array2.Length, array2.Length);
                    Buffer.BlockCopy(BitConverter.GetBytes(传书列表.Count * 32 + 18), 0, array3, 2, 2);
                    Buffer.BlockCopy(BitConverter.GetBytes(传书列表.Count * 32 + 3), 0, array3, 9, 2);
                    Buffer.BlockCopy(BitConverter.GetBytes(传书列表.Count), 0, array3, 12, 2);
                    int num = 0;
                    foreach (个人传书类 value in 传书列表.Values)
                    {
                        byte[] array4 = new byte[32];
                        Buffer.BlockCopy(BitConverter.GetBytes(value.传书ID), 0, array4, 0, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.是否NPC), 0, array4, 4, 1);
                        byte[] bytes = Encoding.Default.GetBytes(value.传书发送人);
                        Buffer.BlockCopy(bytes, 0, array4, 5, bytes.Length);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.传书时间.Year - 2000), 0, array4, 25, 1);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.传书时间.Month), 0, array4, 26, 1);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.传书时间.Day), 0, array4, 27, 1);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.传书时间.Hour), 0, array4, 28, 1);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.传书时间.Minute), 0, array4, 29, 1);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.是否已读), 0, array4, 30, 2);
                        Buffer.BlockCopy(array4, 0, array3, num * 32 + 14, array4.Length);
                        num++;
                    }
                    Client.Send(array3, array3.Length);
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "查看传书出错()出错" + 人物全服ID + "| " + ex.Message);
            }
        }

        public void NPC发送传书(string name, string 内容, bool 是否存储)
        {
            个人传书类 个人传书类 = new 个人传书类();
            个人传书类.传书ID = (int)RxjhClass.GetDBItmeId();
            个人传书类.传书发送人 = name;
            个人传书类.传书内容 = 内容;
            个人传书类.传书时间 = DateTime.Now;
            个人传书类.是否NPC = 0;
            个人传书类.是否已读 = 0;
            传书列表.Add(个人传书类.传书ID, 个人传书类);
            查看传书();
            有新传书提示();
            if (是否存储)
            {
                RxjhClass.创建传书(name, UserName, 0, 内容);
            }
        }

        public void 计算人物基本数据()
        {
            int num = 254;
            if (Player_Level > num)
            {
                Player_Level = num;
            }
            人物最大经验 = (long)World.lever[Player_Level];
            int player_Level = Player_Level;
            while (true)
            {
                if (Client == null || !Client.Running)
                {
                    return;
                }
                if (人物经验 < 人物最大经验)
                {
                    break;
                }
                if (Player_Level >= 255)
                {
                    return;
                }
                Player_Level++;
                人物最大经验 = (long)World.lever[Player_Level];
            }
            if (Player_Level != 1)
            {
                double num2 = 人物经验 - Convert.ToInt64(World.lever[Player_Level - 1]);
                if (num2 < 1.0)
                {
                    Player_Level--;
                    人物最大经验 = (long)World.lever[Player_Level];
                }
            }
            int num3 = Player_Level - player_Level;
            if (num3 > 0)
            {
                升级后的提示();
                if (World.lockLevel.Contains(Player_Level) && Player_LockState < Player_Level)
                {
                    _等级锁定状态 = 0;
                }
                foreach (任务系统 value in World.任务公告list.Values)
                {
                    if ((Player_Zx == value.任务NPC || value.任务NPC == 0) && Player_Level >= value.任务等级 && 人物任务级别 < value.任务等级)
                    {
                        人物任务级别 = value.任务等级;
                        系统提示("我给你发送了一封传书，请注意查收！", 10, value.NPC名字);
                        NPC发送传书(value.NPC名字, value.任务传书内容, false);
                    }
                }
                for (int i = 0; i < num3; i++)
                {
                    if (Player_Level <= 34)
                    {
                        Player_Qigong_point++;
                    }
                    else
                    {
                        Player_Qigong_point += 2;
                    }
                }
            }
            else if (num3 < 0)
            {
                升级后的提示();
                int num4 = player_Level - Player_Level;
                if (num4 > 0)
                {
                    for (int j = 0; j < num4; j++)
                    {
                        if (Player_Level <= 34)
                        {
                            if (Player_Qigong_point >= 1)
                            {
                                Player_Qigong_point--;
                                continue;
                            }
                            for (int k = 0; k < 5; k++)
                            {
                                if (气功[k].气功量 >= 1)
                                {
                                    气功[k].气功量--;
                                    break;
                                }
                            }
                            continue;
                        }
                        if (Player_Qigong_point >= 2)
                        {
                            Player_Qigong_point -= 2;
                            continue;
                        }
                        for (int l = 0; l < 10; l++)
                        {
                            if (气功[l].气功量 >= 2)
                            {
                                气功[l].气功量 -= 2;
                                break;
                            }
                        }
                    }
                }
            }
            人物最大_SP = 100 + Player_Level * 10;
            _人物负重总 = 500 + 20 * Player_Level;
            人物基本最大_HP = 0;
            人物基本最大_MP = 0;
            FLD_心 = 0;
            FLD_身 = 0;
            FLD_命中 = 0;
            FLD_回避 = 0;
            FLD_力 = 0;
            FLD_体 = 0;
            FLD_攻击 = 0;
            FLD_防御 = 0;
            人物武勋增加_AT = 0;
            人物武勋增加_DF = 0;
            人物武勋增加_HP = 0;
            人物武勋增加_MP = 0;
            switch (Player_Job)
            {
                case 1:
                    人物基本最大_HP = 人物_VIP_HP + 133 + Player_Level * 15;
                    人物基本最大_MP = 114 + Player_Level * 2;
                    FLD_心 = 7 + Player_Level;
                    FLD_身 = 8 + Player_Level;
                    FLD_命中 = 8 + Player_Level;
                    FLD_回避 = 8 + Player_Level;
                    FLD_力 = 16;
                    FLD_体 = 9;
                    FLD_攻击 = FLD_VIP_攻击 + 9;
                    FLD_防御 = FLD_VIP_防御 + 16;
                    for (int num6 = 2; num6 <= Player_Level; num6++)
                    {
                        if (num6 % 2 == 0)
                        {
                            FLD_力 += 2;
                            FLD_体 += 2;
                            FLD_攻击 += 2;
                            FLD_防御 += 3;
                        }
                        else
                        {
                            FLD_力++;
                            FLD_体++;
                            FLD_攻击 += 2;
                            FLD_防御 += 2;
                        }
                    }
                    break;
                case 2:
                    人物基本最大_HP = 人物_VIP_HP + 121 + Player_Level * 13;
                    人物基本最大_MP = 116 + Player_Level * 2;
                    FLD_心 = 9;
                    FLD_身 = 7 + Player_Level * 2;
                    FLD_命中 = 8 + Player_Level * 2;
                    FLD_回避 = 8 + Player_Level * 2;
                    FLD_力 = 10 + Player_Level;
                    FLD_体 = 9 + Player_Level * 2;
                    FLD_攻击 = FLD_VIP_攻击 + 9 + Player_Level * 2;
                    FLD_防御 = FLD_VIP_防御 + 10 + Player_Level;
                    for (int n = 2; n <= Player_Level; n++)
                    {
                        if (n % 2 == 0)
                        {
                            FLD_心++;
                        }
                        else
                        {
                            FLD_心 += 2;
                        }
                    }
                    break;
                case 3:
                    人物基本最大_HP = 人物_VIP_HP + 121 + Player_Level * 15;
                    人物基本最大_MP = 116 + Player_Level * 2;
                    FLD_心 = 8 + Player_Level;
                    FLD_身 = 6 + Player_Level;
                    FLD_命中 = 6 + Player_Level;
                    FLD_回避 = 6 + Player_Level;
                    FLD_力 = 10 + Player_Level;
                    FLD_体 = 10 + Player_Level * 3;
                    FLD_攻击 = FLD_VIP_攻击 + 10 + Player_Level * 3;
                    FLD_防御 = FLD_VIP_防御 + 10 + Player_Level * 2;
                    break;
                case 4:
                    人物基本最大_HP = 人物_VIP_HP + 121 + Player_Level * 10;
                    人物基本最大_MP = 116 + Player_Level * 2;
                    FLD_心 = 7 + Player_Level * 2;
                    FLD_身 = 9 + Player_Level * 3;
                    FLD_命中 = 9 + Player_Level * 3;
                    FLD_回避 = 9 + Player_Level * 3;
                    FLD_力 = 7 + Player_Level;
                    FLD_体 = 10;
                    FLD_攻击 = FLD_VIP_攻击 + 11;
                    FLD_防御 = FLD_VIP_防御 + 8 + Player_Level;
                    for (int num5 = 2; num5 <= Player_Level; num5++)
                    {
                        if (num5 % 2 == 0)
                        {
                            FLD_体 += 2;
                            FLD_攻击 += 3;
                        }
                        else
                        {
                            FLD_体 += 3;
                            FLD_攻击 += 4;
                        }
                    }
                    break;
                case 5:
                    人物基本最大_HP = 人物_VIP_HP + 129 + Player_Level * 10;
                    人物基本最大_MP = 130 + Player_Level * 6;
                    FLD_心 = 15 + Player_Level * 3;
                    FLD_身 = 6 + Player_Level;
                    FLD_命中 = 6 + Player_Level;
                    FLD_回避 = 6 + Player_Level;
                    FLD_力 = 7 + Player_Level * 2;
                    FLD_体 = 5 + Player_Level * 2;
                    FLD_攻击 = FLD_VIP_攻击 + 5 + Player_Level * 2;
                    FLD_防御 = FLD_VIP_防御 + 7 + Player_Level;
                    for (int m = 60; m <= Player_Level; m++)
                    {
                        FLD_攻击++;
                    }
                    break;
            }
            int num7 = Player_Job_leve;
            if (Player_Level < 10)
            {
                if (Player_Job_leve > 0)
                {
                    num7 = 0;
                }
            }
            else if (Player_Level < 35)
            {
                if (Player_Job_leve > 1)
                {
                    num7 = 1;
                }
            }
            else if (Player_Level < 60)
            {
                if (Player_Job_leve > 2)
                {
                    num7 = 2;
                }
            }
            else if (Player_Level < 80)
            {
                if (Player_Job_leve > 3)
                {
                    num7 = 3;
                }
            }
            else if (Player_Level < 100 && Player_Job_leve > 4)
            {
                num7 = 4;
            }
            foreach (转职属性类 item in World.转职属性)
            {
                if (item.转职等级 == num7)
                {
                    FLD_攻击 += item.增加攻击;
                    FLD_防御 += item.增加防御;
                    人物基本最大_HP += item.增加HP;
                    人物基本最大_MP += item.增加MP;
                }
            }
            FLD_武勋_追加_气功 = 0;
            if (Config.武勋开关 == 1)
            {
                foreach (武勋加成类 value2 in World.Wxlever.Values)
                {
                    if (人物武勋阶段 == value2.武勋等级)
                    {
                        人物武勋增加_AT = value2.增加攻击;
                        人物武勋增加_DF = value2.增加防御;
                        人物武勋增加_HP = value2.增加HP;
                        人物武勋增加_MP = value2.增加MP;
                     //   系统提示("当前武勋:" + Player_WuXun.ToString() + "系统奖励:攻击+" + value2.增加攻击.ToString() + " 防御+" + value2.增加防御.ToString() + " 生命+" + value2.增加HP.ToString() + " 内功+" + value2.增加MP.ToString(), 9, "系统提示");
                    }
                }
            }
            if (人物灵兽 != null && (人物灵兽.FLD_JOB == 1 || 人物灵兽.FLD_JOB == 5))
            {
                人物基本最大_HP += 人物灵兽.FLD_JOB_LEVEL * 50;
            }
            计算人物装备数据();
        }

        public void 检查公有物品时间()
        {
            try
            {
                Dictionary<int, 公有药品类> dictionary = new Dictionary<int, 公有药品类>();
                foreach (公有药品类 value in 公有药品.Values)
                {
                    dictionary.Add(value.药品ID, value);
                }
                foreach (公有药品类 value2 in dictionary.Values)
                {
                    DateTime t = new DateTime(1970, 1, 1, 8, 0, 0).AddSeconds(value2.时间);
                    if (t < DateTime.Now)
                    {
                        公有药品.Remove(value2.药品ID);
                    }
                }
                dictionary.Clear();
            }
            catch (Exception)
            {
            }
        }

        public bool 检查公有药品()
        {
            bool result = false;
            if (公有药品.ContainsKey(1008000027) || 公有药品.ContainsKey(1008000028) || 公有药品.ContainsKey(1008000029) || 公有药品.ContainsKey(1008000058) || 公有药品.ContainsKey(1008000059) || 公有药品.ContainsKey(1008000060))
            {
                result = true;
            }
            return result;
        }

        public bool 检查金符()
        {
            bool result = false;
            if (公有药品.ContainsKey(1008000027))
            {
                result = true;
            }
            return result;
        }

        public bool 检查银符()
        {
            bool result = false;
            if (公有药品.ContainsKey(1008000028) || 公有药品.ContainsKey(1008000027))
            {
                result = true;
            }
            return result;
        }

        public bool 物品使用穿戴(int 位置)
        {
            for (int i = 0; i < 36; i++)
            {
                if (BitConverter.ToInt32(装备栏包裹[i].物品ID, 0) == 0)
                {
                    装备栏包裹[i].物品_byte = 装备栏已穿装备[位置].物品_byte;
                    装备栏已穿装备[位置].物品_byte = new byte[37];
                    更换装备位置(0, 位置, 1, i, 装备栏包裹[i].物品_byte, 1);
                    物品使用(1,i, 1);
                    return true;
                }
            }
            return false;
        }

        public void 更新人物减经验()
        {
            if (World.是否开启死亡掉经验 == 0 || Player_Level <= World.死亡掉经验开始等级 || Player_LockState == 0)
            {
                return;
            }
            long num = (long)World.lever[Player_Level + 1] - (long)World.lever[Player_Level];
            num /= World.死亡掉经验比例;
            Random random = new Random();
            int num2 = random.Next(1, 5);
            if (检查公有药品())
            {
                num2 = 1;
            }
            num *= num2;
            if (FLD_装备_追加_死亡损失经验减少 > 0.0)
            {
                num = (long)((double)num * (1.0 - FLD_装备_追加_死亡损失经验减少));
                if (num < 0)
                {
                    num = 0L;
                }
            }
            int num3 = BitConverter.ToInt32(装备栏已穿装备[9].物品ID, 0);
            if (num3 == 700004)
            {
                if (物品使用穿戴(9))
                {
                    num = 0L;
                }
            }
            else
            {
                num3 = BitConverter.ToInt32(装备栏已穿装备[10].物品ID, 0);
                if (num3 == 700004 && 物品使用穿戴(10))
                {
                    num = 0L;
                }
            }
            if (num > 30000000)
            {
                num = 10000000L;
            }
            人物经验 -= num;
            计算人物基本数据3();
            更新经验和历练();
        }
        public void 复仇更新人物减经验()
        {

            long num = (long)World.lever[Player_Level + 1] - (long)World.lever[Player_Level];
            num /= int.Parse(World.fc[8]);
            //Random random = new Random();
            //int num2 = random.Next(1, 5);
            //if (检查公有药品())
            //{
            //    num2 = 1;
            //}
            //num *= num2;
            //if (FLD_装备_追加_死亡损失经验减少 > 0.0)
            //{
            //    num = (long)((double)num * (1.0 - FLD_装备_追加_死亡损失经验减少));
            //    if (num < 0)
            //    {
            //        num = 0L;
            //    }
            //}
            //int num3 = BitConverter.ToInt32(装备栏已穿装备[9].物品ID, 0);
            //if (num3 == 700004)
            //{
            //    if (物品使用穿戴(9))
            //    {
            //        num = 0L;
            //    }
            //}
            //else
            //{
            //    num3 = BitConverter.ToInt32(装备栏已穿装备[10].物品ID, 0);
            //    if (num3 == 700004 && 物品使用穿戴(10))
            //    {
            //        num = 0L;
            //    }
            //}
            if (num > 30000000)
            {
                num = 10000000L;
            }
            人物经验 -= num;
            计算人物基本数据3();
            更新经验和历练();
        }
        public void 更新经验和历练()
        {
            double num = Convert.ToInt64(World.lever[Player_Level]) - Convert.ToInt64(World.lever[Player_Level - 1]);
            double num2 = 人物经验 - Convert.ToInt64(World.lever[Player_Level - 1]);
            if (num2 < 1.0)
            {
                人物经验 = Convert.ToInt64(World.lever[Player_Level - 1]);
                num2 = 0.0;
            }
            if (num > 2147483647.0)
            {
                double num3 = num / 2147483647.0;
                num = 2147483647.0;
                num2 /= num3;
            }
            发包类 发包类 = new 发包类();
            发包类.Write4((uint)num2);
            发包类.Write4((uint)num);
            发包类.Write4(0);
            发包类.Write4(Player_ExpErience);
            if (Client != null)
            {
                Client.SendPak(发包类, 27136, 人物全服ID);
            }
        }

        public void 更新金钱和负重()
        {
            if (Player_Money < 0)
            {
                Player_Money = 0;
            }
            else if (Player_Money > World.最大钱数)
            {
                Player_Money = World.最大钱数;
            }
            _人物负重 = 0;
            for (int i = 0; i < 66; i++)
            {
                _人物负重 += 装备栏包裹[i].物品总重量;
            }
            发包类 发包类 = new 发包类();
            发包类.Write4(Player_Money);
            发包类.Write4(0);
            发包类.Write4(人物负重);
            发包类.Write4(人物负重总);
            if (Client != null)
            {
                Client.SendPak(发包类, 31744, 人物全服ID);
            }
        }

        public void 初始话气功()
        {
            发包类 发包类 = new 发包类();
            发包类.Write2(100);
            发包类.Write2(15213);
            发包类.Write4(0);
            发包类.Write2(60);
            发包类.Write2(3700);
            发包类.Write2(0);
            for (int i = 0; i < 14; i++)
            {
                if (i < 11)
                {
                    发包类.Write(气功[i].气功ID);
                    if (气功[i].气功ID != 0)
                    {
                        if (气功[i].气功量 != 0)
                        {
                            if (气功[i].气功量 > 20)
                            {
                                气功[i].气功量 = 20;
                            }
                            发包类.Write(气功[i].气功量 + FLD_装备_追加_气功 + FLD_人物_追加_气功 + FLD_武勋_追加_气功);
                        }
                        else
                        {
                            发包类.Write(0);
                        }
                    }
                    else
                    {
                        发包类.Write(0);
                    }
                    发包类.Write(0);
                }
                else
                {
                    发包类.Write4(0);
                }
            }
            发包类.Write2(0);
            发包类.Write2(65520);
            发包类.Write2(7);
            发包类.Write4(0);
            if (Client != null)
            {
                Client.SendPak(发包类, 27648, 人物全服ID);
            }
        }

        public void 更新武功和状态()
        {
            if ((double)Player_WuXun > World.Wxlever[6].武勋点)
            {
                人物武勋阶段 = 7;
            }
            else if ((double)Player_WuXun > World.Wxlever[5].武勋点)
            {
                人物武勋阶段 = 6;
            }
            else if ((double)Player_WuXun > World.Wxlever[4].武勋点)
            {
                人物武勋阶段 = 5;
            }
            else if ((double)Player_WuXun > World.Wxlever[3].武勋点)
            {
                人物武勋阶段 = 4;
            }
            else if ((double)Player_WuXun > World.Wxlever[2].武勋点)
            {
                人物武勋阶段 = 3;
            }
            else if ((double)Player_WuXun > World.Wxlever[1].武勋点)
            {
                人物武勋阶段 = 2;
            }
            else
            {
                人物武勋阶段 = 1;
            }
            try
            {
                发包类 发包类 = new 发包类();
                发包类.Write2(Player_Level);
                发包类.Write2(FLD_心);
                发包类.Write2(FLD_力);
                发包类.Write2(FLD_体);
                发包类.Write2(FLD_身);
                发包类.Write2(0);
                发包类.Write2(FLD_人物基本_攻击);
                发包类.Write2(FLD_人物基本_防御);
                发包类.Write2(FLD_人物基本_命中);
                发包类.Write2(FLD_人物基本_回避);
                发包类.Write2(Player_Qigong_point);
                for (int i = 0; i < 14; i++)
                {
                    if (i < 11)
                    {
                        发包类.Write(气功[i].气功ID);
                        if (气功[i].气功ID != 0)
                        {
                            if (气功[i].气功量 != 0)
                            {
                                if (气功[i].气功量 > 20)
                                {
                                    气功[i].气功量 = 20;
                                }
                                int num = 气功[i].气功量 + FLD_装备_追加_气功 + FLD_人物_追加_气功 + FLD_武勋_追加_气功;
                                switch (Player_Job)
                                {
                                    case 1:
                                        switch (i)
                                        {
                                            case 0:
                                                发包类.Write(num + FLD_装备_追加_刀客力劈华山);
                                                break;
                                            case 1:
                                                发包类.Write(num + FLD_装备_追加_刀客摄魂一击);
                                                break;
                                            case 2:
                                                发包类.Write(num + FLD_装备_追加_刀客连环飞舞);
                                                break;
                                            case 3:
                                                发包类.Write(num + FLD_装备_追加_刀客必杀一击);
                                                break;
                                            case 4:
                                                发包类.Write(num + FLD_装备_追加_刀客狂风万破);
                                                break;
                                            case 5:
                                                发包类.Write(num + FLD_装备_追加_刀客四两千斤);
                                                break;
                                            case 6:
                                                发包类.Write(num + FLD_装备_追加_刀客霸气破甲);
                                                break;
                                            case 7:
                                                发包类.Write(num + FLD_装备_追加_刀客真武绝击);
                                                break;
                                            case 8:
                                                发包类.Write(num + FLD_装备_追加_刀客暗影绝杀);
                                                break;
                                            case 9:
                                                发包类.Write(num + FLD_装备_追加_刀客稳如泰山);
                                                break;
                                            default:
                                                发包类.Write(num);
                                                break;
                                        }
                                        break;
                                    case 2:
                                        switch (i)
                                        {
                                            case 0:
                                                发包类.Write(num + FLD_装备_追加_剑客长虹贯日);
                                                break;
                                            case 1:
                                                发包类.Write(num + FLD_装备_追加_剑客百变神行);
                                                break;
                                            case 2:
                                                发包类.Write(num + FLD_装备_追加_剑客连环飞舞);
                                                break;
                                            case 3:
                                                发包类.Write(num + FLD_装备_追加_剑客必杀一击);
                                                break;
                                            case 4:
                                                发包类.Write(num + FLD_装备_追加_剑客狂风万破);
                                                break;
                                            case 5:
                                                发包类.Write(num + FLD_装备_追加_剑客护身罡气);
                                                break;
                                            case 6:
                                                发包类.Write(num + FLD_装备_追加_剑客移花接木);
                                                break;
                                            case 7:
                                                发包类.Write(num + FLD_装备_追加_剑客回柳身法);
                                                break;
                                            case 8:
                                                发包类.Write(num + FLD_装备_追加_剑客怒海狂澜);
                                                break;
                                            case 9:
                                                发包类.Write(num + FLD_装备_追加_剑客冲冠一怒);
                                                break;
                                            default:
                                                发包类.Write(num);
                                                break;
                                        }
                                        break;
                                    case 3:
                                        switch (i)
                                        {
                                            case 0:
                                                发包类.Write(num + FLD_装备_追加_枪客金钟罩气);
                                                break;
                                            case 1:
                                                发包类.Write(num + FLD_装备_追加_枪客运气疗伤);
                                                break;
                                            case 2:
                                                发包类.Write(num + FLD_装备_追加_枪客连环飞舞);
                                                break;
                                            case 3:
                                                发包类.Write(num + FLD_装备_追加_枪客必杀一击);
                                                break;
                                            case 4:
                                                发包类.Write(num + FLD_装备_追加_枪客狂风万破);
                                                break;
                                            case 5:
                                                发包类.Write(num + FLD_装备_追加_枪客横练太保);
                                                break;
                                            case 6:
                                                发包类.Write(num + FLD_装备_追加_枪客乾坤挪移);
                                                break;
                                            case 7:
                                                发包类.Write(num + FLD_装备_追加_枪客灵甲护身);
                                                break;
                                            case 8:
                                                发包类.Write(num + FLD_装备_追加_枪客狂神降世);
                                                break;
                                            case 9:
                                                发包类.Write(num + FLD_装备_追加_枪客转守为攻);
                                                break;
                                            default:
                                                发包类.Write(num);
                                                break;
                                        }
                                        break;
                                    case 4:
                                        switch (i)
                                        {
                                            case 0:
                                                发包类.Write(num + FLD_装备_追加_弓百步穿杨);
                                                break;
                                            case 1:
                                                发包类.Write(num + FLD_装备_追加_弓猎鹰之眼);
                                                break;
                                            case 2:
                                                发包类.Write(num + FLD_装备_追加_弓凝神聚气);
                                                break;
                                            case 3:
                                                发包类.Write(num + FLD_装备_追加_弓必杀一击);
                                                break;
                                            case 4:
                                                发包类.Write(num + FLD_装备_追加_弓狂风万破);
                                                break;
                                            case 5:
                                                发包类.Write(num + FLD_装备_追加_弓正本培元);
                                                break;
                                            case 6:
                                                发包类.Write(num + FLD_装备_追加_弓心神凝聚);
                                                break;
                                            case 7:
                                                发包类.Write(num + FLD_装备_追加_弓流星三矢);
                                                break;
                                            case 8:
                                                发包类.Write(num + FLD_装备_追加_弓锐利之箭);
                                                break;
                                            case 9:
                                                发包类.Write(num + FLD_装备_追加_弓无明暗矢);
                                                break;
                                            default:
                                                发包类.Write(num);
                                                break;
                                        }
                                        break;
                                    case 5:
                                        switch (i)
                                        {
                                            case 0:
                                                发包类.Write(num + FLD_装备_追加_医运气行心);
                                                break;
                                            case 1:
                                                发包类.Write(num + FLD_装备_追加_医太极心法);
                                                break;
                                            case 2:
                                                发包类.Write(num + FLD_装备_追加_医体血倍增);
                                                break;
                                            case 3:
                                                发包类.Write(num + FLD_装备_追加_医洗髓易经);
                                                break;
                                            case 4:
                                                发包类.Write(num + FLD_装备_追加_医妙手回春);
                                                break;
                                            case 5:
                                                发包类.Write(num + FLD_装备_追加_医长功攻击);
                                                break;
                                            case 6:
                                                发包类.Write(num + FLD_装备_追加_医吸星大法);
                                                break;
                                            case 7:
                                                发包类.Write(num + FLD_装备_追加_医神农仙术);
                                                break;
                                            case 8:
                                                发包类.Write(num + FLD_装备_追加_医天佑之气);
                                                break;
                                            case 9:
                                                发包类.Write(num + FLD_装备_追加_医九天真气);
                                                break;
                                            default:
                                                发包类.Write(num);
                                                break;
                                        }
                                        break;
                                }
                            }
                            else
                            {
                                发包类.Write(0);
                            }
                        }
                        else
                        {
                            发包类.Write(0);
                        }
                        发包类.Write(0);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                发包类.Write(0);
                for (int j = 0; j < 28; j++)
                {
                    if (武功新[0, j] != null)
                    {
                        发包类.Write4(武功新[0, j].FLD_PID);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                for (int k = 0; k < 28; k++)
                {
                    if (武功新[1, k] != null)
                    {
                        发包类.Write4(武功新[1, k].FLD_PID);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                for (int l = 0; l < 18; l++)
                {
                    if (武功新[2, l] != null)
                    {
                        发包类.Write4(武功新[2, l].FLD_PID);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                发包类.Write4(0);
                发包类.Write4(0);
                发包类.Write4(0);
                if (Player_WuXun < 0)
                {
                    Player_WuXun = 0;
                }
                发包类.Write4(Player_WuXun);
                发包类.Write4(人物善恶);
                发包类.Write2(0);
                if (Client != null)
                {
                    Client.SendPak(发包类, 27392, 人物全服ID);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                Form1.WriteLine(1, "更新武功和状态出错[" + Userid + "]-[" + UserName + "] " + ex.Message);
            }
        }

        public void 发送任务物品列表()
        {
            try
            {
                using (发包类 发包类 = new 发包类())
                {
                    发包类.Write4(36);
                    for (int i = 0; i < 36; i++)
                    {
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write4(任务物品[i].物品ID);
                        发包类.Write4(任务物品[i].物品数量);
                    }
                    if (Client != null)
                    {
                        Client.SendPak(发包类, 33024, 人物全服ID);
                    }
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "发送任务物品列表出错![" + Userid + "]-[" + UserName + "]" + ex);
            }
        }

        public void 初始话装备篮包裹()
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(257);
            if (公有药品.ContainsKey(1008000027) || 公有药品.ContainsKey(1008000058) || 公有药品.ContainsKey(1008000061))
            {
                发包类.Write4(2);
            }
            else
            {
                发包类.Write4(0);
            }
            for (int i = 0; i < 66; i++)
            {
                if (BitConverter.ToInt32(装备栏包裹[i].物品数量, 0) == 0)
                {
                    装备栏包裹[i].物品_byte = new byte[37];
                }
                else if (装备栏包裹[i].Get物品ID == 1000000286 || 装备栏包裹[i].Get物品ID == 1000000287 || 装备栏包裹[i].Get物品ID == 1008000055)
                {
                    装备栏包裹[i].物品_byte = new byte[37];
                }
                else
                {
                    检查物品系统("装备栏包裹", ref 装备栏包裹[i]);
                }
                发包类.Write(装备栏包裹[i].GetByte(), 0, World.单个物品大小);
            }
            if (Client != null)
            {
                Client.SendPak(发包类, 28928, 人物全服ID);
            }
        }

        public void 初始话已装备物品()
        {
            new DateTime(1970, 1, 1, 8, 0, 0);
            try
            {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append("AA557B02010A00A0006C02010000000A000000BDD600000000000000000000000000000000000000000000000000000000000000000100000000000100000001012383010301008FB0DC4500007041A9A5FA43C90000000000000036A343D9A66ACC0657237F1201000000CF07CC3CA8778E069E778E06A0778E06A2778E06A63CE99BA501D00618F7070001000000032D3101A8778E06A6778E06A6778E06A8778E064AA0B1DB8B21D00618F7070001000000032D3101A8778E06A8778E06A4778E06A6778E06000000000000000000000000000000000000000000000000000000000000000000000000BA1A053F9221D006F98A0C0001000000032D3101A4778E06A4778E06A4778E06A6778E06C8B29DC49C68CD06A668060001000000032D3101A8778E0600000000A8778E0600000000A8DD14789D67CD06CAD40100010001000000000094C3C901145A62028AF0FA020A879303F809F83D1F63CD06244E00000100010000000000A8C3C90100000000000000000000000044FDB9258465C906244E00000100010000000000A8C3C901000000000000000000000000B2806B8F0C0FD0066AAE0A0001000100000000008AF0FA020000000000000000000000000C15052D9323D00669AE0A00010001000000000089F0FA02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA");
                byte[] array = Converter.hexStringToByte(stringBuilder.ToString());
                byte[] bytes = Encoding.Default.GetBytes(UserName);
                Buffer.BlockCopy(bytes, 0, array, 19, bytes.Length);
                Buffer.BlockCopy(BitConverter.GetBytes(人物坐标_X), 0, array, 71, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(人物坐标_Z), 0, array, 75, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(人物坐标_Y), 0, array, 79, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(人物坐标_地图), 0, array, 83, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 15, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(Player_Zx), 0, array, 57, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(Player_Level), 0, array, 59, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(Player_Job_leve), 0, array, 61, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(Player_Job), 0, array, 63, 1);
                if (帮派Id != 0)
                {
                    byte[] bytes2 = BitConverter.GetBytes(帮派Id);
                    Buffer.BlockCopy(bytes2, 0, array, 35, bytes2.Length);
                    byte[] bytes3 = Encoding.Default.GetBytes(帮派名字);
                    Buffer.BlockCopy(bytes3, 0, array, 39, bytes3.Length);
                    Buffer.BlockCopy(BitConverter.GetBytes(帮派人物等级), 0, array, 54, 1);
                    if (帮派门徽 != null)
                    {
                        Buffer.BlockCopy(BitConverter.GetBytes(World.服务器组ID), 0, array, 55, 1);
                    }
                }
                Buffer.BlockCopy(New人物模版.人物模板_byte, 0, array, 64, 6);
                for (int i = 0; i < 15; i++)
                {
                    if (BitConverter.ToInt32(装备栏已穿装备[i].物品数量, 0) == 0)
                    {
                        装备栏已穿装备[i].物品_byte = new byte[37];
                    }
                    else
                    {
                        检查物品系统("装备栏已穿装备", ref 装备栏已穿装备[i]);
                    }
                    Buffer.BlockCopy(装备栏已穿装备[i].GetByte(), 0, array, 91 + i * World.单个物品大小, World.单个物品大小);
                }
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 15, 2);
                if (Client != null)
                {
                    Client.Send多包(array, array.Length);
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "初始话已装备物品出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
        }

        public void 保存师徒数据存储过程()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存师徒数据存储过程()");
            }
            try
            {
                SqlParameter[] prams = new SqlParameter[7]
                {
                SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 20, UserName),
                SqlDBA.MakeInParam("@level", SqlDbType.Int, 0, 师傅数据.TLEVEL),
                SqlDBA.MakeInParam("@stlevel", SqlDbType.Int, 0, 师傅数据.STLEVEL),
                SqlDBA.MakeInParam("@styhd", SqlDbType.Int, 0, 师傅数据.STYHD),
                SqlDBA.MakeInParam("@stwg1", SqlDbType.Int, 0, 师傅数据.STWG1),
                SqlDBA.MakeInParam("@stwg2", SqlDbType.Int, 0, 师傅数据.STWG2),
                SqlDBA.MakeInParam("@stwg3", SqlDbType.Int, 0, 师傅数据.STWG3)
                };
                DbPoolClass dbPoolClass = new DbPoolClass();
                dbPoolClass.Conn = DBA.getstrConnection(null);
                dbPoolClass.Prams = prams;
                dbPoolClass.Sql = "UPDATE_St_DATA";
                World.SqlPool.Enqueue(dbPoolClass);
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存师徒数据出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
        }

        public void 保存人物数据存储过程()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存人物数据存储过程()");
            }
            try
            {
                SqlParameter[] prams = new SqlParameter[43]
                {
                SqlDBA.MakeInParam("@id", SqlDbType.VarChar, 20, Userid),
                SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 20, UserName),
                SqlDBA.MakeInParam("@level", SqlDbType.Int, 0, Player_Level),
                SqlDBA.MakeInParam("@strFace", SqlDbType.VarBinary, 10, New人物模版.人物模板_byte),
                SqlDBA.MakeInParam("@job", SqlDbType.Int, 0, Player_Job),
                SqlDBA.MakeInParam("@exp", SqlDbType.VarChar, 50, 人物经验),
                SqlDBA.MakeInParam("@zx", SqlDbType.Int, 0, Player_Zx),
                SqlDBA.MakeInParam("@job_level", SqlDbType.Int, 0, Player_Job_leve),
                SqlDBA.MakeInParam("@x", SqlDbType.Float, 0, 人物坐标_X),
                SqlDBA.MakeInParam("@y", SqlDbType.Float, 0, 人物坐标_Y),
                SqlDBA.MakeInParam("@z", SqlDbType.Float, 0, 人物坐标_Z),
                SqlDBA.MakeInParam("@menow", SqlDbType.Int, 0, 人物坐标_地图),
                SqlDBA.MakeInParam("@money", SqlDbType.VarChar, 0, Player_Money),
                SqlDBA.MakeInParam("@hp", SqlDbType.Int, 0, 人物_HP),
                SqlDBA.MakeInParam("@mp", SqlDbType.Int, 0, 人物_MP),
                SqlDBA.MakeInParam("@sp", SqlDbType.Int, 0, 人物_SP),
                SqlDBA.MakeInParam("@wx", SqlDbType.Int, 0, Player_WuXun),
                SqlDBA.MakeInParam("@se", SqlDbType.Int, 0, 人物善恶),
                SqlDBA.MakeInParam("@point", SqlDbType.Int, 0, Player_Qigong_point),
                SqlDBA.MakeInParam("@strSkills", SqlDbType.VarBinary, 20, GetWgCodesbyte()),
                SqlDBA.MakeInParam("@strWearitem", SqlDbType.VarBinary, 2190, GetWEARITEMCodesbyte()),
                SqlDBA.MakeInParam("@strItem", SqlDbType.VarBinary, 4818, GetFLD_ITEMCodesbyte()),
                SqlDBA.MakeInParam("@strQusetItem", SqlDbType.VarBinary, 300, GetQuestITEMCodesbyte()),
                SqlDBA.MakeInParam("@strKongfu", SqlDbType.VarBinary, 312, GetFLD_KONGFUCodesbyte()),
                SqlDBA.MakeInParam("@strCtime", SqlDbType.VarBinary, 160, Get个人药品byte()),
                SqlDBA.MakeInParam("@strDoors", SqlDbType.VarBinary, 1200, Get土灵符byte()),
                SqlDBA.MakeInParam("@strQuest", SqlDbType.VarBinary, 400, Get任务byte()),
                SqlDBA.MakeInParam("@fight_exp", SqlDbType.Int, 0, Player_ExpErience),
                SqlDBA.MakeInParam("@rwqg", SqlDbType.Int, 0, 人物轻功),
                SqlDBA.MakeInParam("@NameType", SqlDbType.VarBinary, 48, 人物名字模版),
                SqlDBA.MakeInParam("@zbver", SqlDbType.Int, 0, Player_LockState),
                SqlDBA.MakeInParam("@strCtimeNew", SqlDbType.VarBinary, 224, Get个人药品Newbyte()),
                SqlDBA.MakeInParam("@vipat", SqlDbType.Int, 0, FLD_VIP_攻击 * 2),
                SqlDBA.MakeInParam("@vipdf", SqlDbType.Int, 0, FLD_VIP_防御 * 2),
                SqlDBA.MakeInParam("@viphp", SqlDbType.Int, 0, 人物_VIP_HP * 2),
                SqlDBA.MakeInParam("@viplevel", SqlDbType.Int, 0, Player_vip_leve),
                SqlDBA.MakeInParam("@zscs", SqlDbType.Int, 0, 护心丹使用时间),
                SqlDBA.MakeInParam("@sjjl", SqlDbType.Int, 0, Player_jllevel),
                SqlDBA.MakeInParam("@rwdj", SqlDbType.Float, 0, 人物任务级别),
                SqlDBA.MakeInParam("@fbcs", SqlDbType.Float, 0, 副本次数),
                SqlDBA.MakeInParam("@bosscount", SqlDbType.Float, 0, BOSS次数),
                SqlDBA.MakeInParam("@qlname", SqlDbType.VarChar, 0, this.FLD_情侣),
                SqlDBA.MakeInParam("@config", SqlDbType.VarChar, 100, 客户端设置)
                };
                DbPoolClass dbPoolClass = new DbPoolClass();
                dbPoolClass.Conn = DBA.getstrConnection(null);
                dbPoolClass.Prams = prams;
                dbPoolClass.Sql = "UPDATE_USER_DATA";
                World.SqlPool.Enqueue(dbPoolClass);
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存人物数据出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
        }

        public void 保存个人仓库存储过程()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存个人仓库存储过程()");
            }
            try
            {
                SqlParameter[] prams = new SqlParameter[4]
                {
                SqlDBA.MakeInParam("@id", SqlDbType.VarChar, 20, Userid),
                SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 20, UserName),
                SqlDBA.MakeInParam("@money", SqlDbType.VarChar, 0, 个人仓库钱数),
                SqlDBA.MakeInParam("@strItem", SqlDbType.VarBinary, 4380, Get个人仓库byte())
                };
                DbPoolClass dbPoolClass = new DbPoolClass();
                dbPoolClass.Conn = DBA.getstrConnection(null);
                dbPoolClass.Prams = prams;
                dbPoolClass.Sql = "UPDATE_USER_Warehouse";
                World.SqlPool.Enqueue(dbPoolClass);
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存个人仓库数据出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
        }

        public void 保存综合仓库存储过程()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存综合仓库存储过程()");
            }
            try
            {
                SqlParameter[] prams = new SqlParameter[5]
                {
                SqlDBA.MakeInParam("@id", SqlDbType.VarChar, 20, Userid),
                SqlDBA.MakeInParam("@money", SqlDbType.VarChar, 0, 综合仓库钱数),
                SqlDBA.MakeInParam("@strItem", SqlDbType.VarBinary, 4380, Get综合仓库byte()),
                SqlDBA.MakeInParam("@strItime", SqlDbType.VarBinary, 50, Get综合仓库品byte()),
                SqlDBA.MakeInParam("@zbver", SqlDbType.Int, 0, 综合仓库装备数据版本)
                };
                DbPoolClass dbPoolClass = new DbPoolClass();
                dbPoolClass.Conn = DBA.getstrConnection(null);
                dbPoolClass.Prams = prams;
                dbPoolClass.Sql = "UPDATE_ID_Warehouse";
                World.SqlPool.Enqueue(dbPoolClass);
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存个人仓库数据出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
        }

        public void 检察元宝数据(int 元宝, int 类型)
        {
            if (元宝 < 0)
            {
                Form1.WriteLine(100, "元宝数据异常[" + Userid + "]-[" + UserName + "] [" + FLD_RXPIONT + "] [" + 元宝 + "]");
            }
            if (类型 == 0)
            {
                FLD_RXPIONT -= 元宝;
                FLD_RXPIONTX -= 元宝;
            }
            else
            {
                FLD_RXPIONT += 元宝;
                FLD_RXPIONTX += 元宝;
            }
        }


        public void 保存推广数据(Players 推广人物 )
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存推广数据()");
            }
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("UPDATE [TBL_ACCOUNT] SET FLD_TGY = {1}, FLD_TGYJLJD = {2}, FLD_TGRS = {3} WHERE FLD_ID = '{0}'", 推广人物.Userid, 推广人物.FLD_TGY, 推广人物.FLD_TGYJLJD , 推广人物.FLD_TGRS);
            if (DBA.ExeSqlCommand(stringBuilder.ToString(), "rxjhaccount") == -1)
            {
                Form1.WriteLine(1, "保存ID 推广 数据出错[" + 推广人物.Userid  + "]");
            }
        }



        public void 保存元宝数据()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存元宝数据()");
            }
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("UPDATE [TBL_ACCOUNT] SET FLD_RXPIONT = {1}, FLD_RXPIONTX = {2} WHERE FLD_ID = '{0}'", Userid, FLD_RXPIONT, FLD_RXPIONTX);
            if (DBA.ExeSqlCommand(stringBuilder.ToString(), "rxjhaccount") == -1)
            {
                Form1.WriteLine(1, "保存ID 元宝 数据出错[" + Userid + "]-[" + UserName + "]");
            }
        }

        public void 保存内网数据(string id, string nip)
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存内网数据()");
            }
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("UPDATE [TBL_ACCOUNT] SET FLD_NIP = '{1}' WHERE FLD_ID = '{0}'", id, nip);
            if (DBA.ExeSqlCommand(stringBuilder.ToString(), "rxjhaccount") == -1)
            {
                Form1.WriteLine(1, "保存内网数据 数据出错[" + Userid + "]-[" + UserName + "]");
            }
        }

        public void 检察积分数据(int 积分, int 类型)
        {
            if (类型 == 0)
            {
                FLD_积分 -= 积分;
            }
            else
            {
                FLD_积分 += 积分;
            }
        }

        public void 保存积分数据()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存积分数据()");
            }
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("UPDATE [TBL_ACCOUNT] SET FLD_JF = {1} WHERE FLD_ID = '{0}'", Userid, FLD_积分);
            if (DBA.ExeSqlCommand(stringBuilder.ToString(), "rxjhaccount") == -1)
            {
                Form1.WriteLine(1, "保存ID 积分 数据出错[" + Userid + "]-[" + UserName + "]");
            }
        }

        public void 保存会员数据()
        {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("UPDATE TBL_ACCOUNT SET FLD_VIP={1},FLD_VIPTIM='{2}' WHERE FLD_ID='{0}'", Userid, 1, FLD_VIPTIM);
            if (DBA.ExeSqlCommand(stringBuilder.ToString(), "rxjhaccount") == -1)
            {
                Form1.WriteLine(1, "保存ID 会员 数据出错[" + Userid + "]-[" + UserName + "]");
            }
        }
        public void 保存退出数据()
        {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.AppendFormat("UPDATE TBL_ACCOUNT SET FLD_OUTSJ='{1}' WHERE FLD_ID='{0}'", Userid, FLD_OUTSJ);
            if (DBA.ExeSqlCommand(stringBuilder.ToString(), "rxjhaccount") == -1)
            {
                Form1.WriteLine(1, "保存退出时间 数据出错[" + Userid + "]-[" + UserName + "]");
            }
        }

        public void 保存人物数据存储过程NEW()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存人物数据存储过程()");
            }
            try
            {
                SqlParameter[] prams = new SqlParameter[48]
                {
                SqlDBA.MakeInParam("@id", SqlDbType.VarChar, 20, Userid),
                SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 20, UserName),
                SqlDBA.MakeInParam("@level", SqlDbType.Int, 0, Player_Level),
                SqlDBA.MakeInParam("@strFace", SqlDbType.VarBinary, 10, New人物模版.人物模板_byte),
                SqlDBA.MakeInParam("@job", SqlDbType.Int, 0, Player_Job),
                SqlDBA.MakeInParam("@exp", SqlDbType.VarChar, 50, 人物经验),
                SqlDBA.MakeInParam("@zx", SqlDbType.Int, 0, Player_Zx),
                SqlDBA.MakeInParam("@job_level", SqlDbType.Int, 0, Player_Job_leve),
                SqlDBA.MakeInParam("@x", SqlDbType.Float, 0, 人物坐标_X),
                SqlDBA.MakeInParam("@y", SqlDbType.Float, 0, 人物坐标_Y),
                SqlDBA.MakeInParam("@z", SqlDbType.Float, 0, 人物坐标_Z),
                SqlDBA.MakeInParam("@menow", SqlDbType.Int, 0, 人物坐标_地图),
                SqlDBA.MakeInParam("@money", SqlDbType.VarChar, 0, Player_Money),
                SqlDBA.MakeInParam("@hp", SqlDbType.Int, 0, 人物_HP),
                SqlDBA.MakeInParam("@mp", SqlDbType.Int, 0, 人物_MP),
                SqlDBA.MakeInParam("@sp", SqlDbType.Int, 0, 人物_SP),
                SqlDBA.MakeInParam("@wx", SqlDbType.Int, 0, Player_WuXun),
                SqlDBA.MakeInParam("@se", SqlDbType.Int, 0, 人物善恶),
                SqlDBA.MakeInParam("@point", SqlDbType.Int, 0, Player_Qigong_point),
                SqlDBA.MakeInParam("@strSkills", SqlDbType.VarBinary, 20, GetWgCodesbyte()),
                SqlDBA.MakeInParam("@strWearitem", SqlDbType.VarBinary, 2190, GetWEARITEMCodesbyte()),
                SqlDBA.MakeInParam("@strItem", SqlDbType.VarBinary, 4818, GetFLD_ITEMCodesbyte()),
                SqlDBA.MakeInParam("@strQusetItem", SqlDbType.VarBinary, 300, GetQuestITEMCodesbyte()),
                SqlDBA.MakeInParam("@strKongfu", SqlDbType.VarBinary, 312, GetFLD_KONGFUCodesbyte()),
                SqlDBA.MakeInParam("@strCtime", SqlDbType.VarBinary, 160, Get个人药品byte()),
                SqlDBA.MakeInParam("@strDoors", SqlDbType.VarBinary, 1200, Get土灵符byte()),
                SqlDBA.MakeInParam("@strQuest", SqlDbType.VarBinary, 400, Get任务byte()),
                SqlDBA.MakeInParam("@fight_exp", SqlDbType.Int, 0, Player_ExpErience),
                SqlDBA.MakeInParam("@rwqg", SqlDbType.Int, 0, 人物轻功),
                SqlDBA.MakeInParam("@NameType", SqlDbType.VarBinary, 48, 人物名字模版),
                SqlDBA.MakeInParam("@zbver", SqlDbType.Int, 0, Player_LockState),
                SqlDBA.MakeInParam("@strCtimeNew", SqlDbType.VarBinary, 224, Get个人药品Newbyte()),
                SqlDBA.MakeInParam("@vipat", SqlDbType.Int, 0, FLD_VIP_攻击 * 2),
                SqlDBA.MakeInParam("@vipdf", SqlDbType.Int, 0, FLD_VIP_防御 * 2),
                SqlDBA.MakeInParam("@viphp", SqlDbType.Int, 0, 人物_VIP_HP * 2),
                SqlDBA.MakeInParam("@viplevel", SqlDbType.Int, 0, Player_vip_leve),
                SqlDBA.MakeInParam("@zscs", SqlDbType.Int, 0, 护心丹使用时间),
                SqlDBA.MakeInParam("@sjjl", SqlDbType.Int, 0, Player_jllevel),
                SqlDBA.MakeInParam("@rwdj", SqlDbType.Float, 0, 人物任务级别),
                SqlDBA.MakeInParam("@fbcs", SqlDbType.Float, 0, 副本次数),
                SqlDBA.MakeInParam("@primoney", SqlDbType.VarChar, 0, 个人仓库钱数),
                SqlDBA.MakeInParam("@pristrItem", SqlDbType.VarBinary, 4380, Get个人仓库byte()),
                SqlDBA.MakeInParam("@pubmoney", SqlDbType.VarChar, 0, 综合仓库钱数),
                SqlDBA.MakeInParam("@pustrItem", SqlDbType.VarBinary, 4380, Get综合仓库byte()),
                SqlDBA.MakeInParam("@pustrItime", SqlDbType.VarBinary, 50, Get综合仓库品byte()),
                SqlDBA.MakeInParam("@bosscount", SqlDbType.Float, 0, BOSS次数),
                SqlDBA.MakeInParam("@qlname", SqlDbType.VarChar, 0, this.FLD_情侣),
                SqlDBA.MakeInParam("@config", SqlDbType.VarChar, 100, 客户端设置)
                };
                DbPoolClass dbPoolClass = new DbPoolClass();
                dbPoolClass.Conn = DBA.getstrConnection(null);
                dbPoolClass.Prams = prams;
                dbPoolClass.Sql = "UPDATE_USER_DATA_NEW";
                World.SqlPool.Enqueue(dbPoolClass);
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存人物数据NEW出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
        }

        public bool 保存人物数据RightNow()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存人物数据RightNow()");
            }
            try
            {
                SqlParameter[] prams = new SqlParameter[48]
                {
                SqlDBA.MakeInParam("@id", SqlDbType.VarChar, 20, Userid),
                SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 20, UserName),
                SqlDBA.MakeInParam("@level", SqlDbType.Int, 0, Player_Level),
                SqlDBA.MakeInParam("@strFace", SqlDbType.VarBinary, 10, New人物模版.人物模板_byte),
                SqlDBA.MakeInParam("@job", SqlDbType.Int, 0, Player_Job),
                SqlDBA.MakeInParam("@exp", SqlDbType.VarChar, 50, 人物经验),
                SqlDBA.MakeInParam("@zx", SqlDbType.Int, 0, Player_Zx),
                SqlDBA.MakeInParam("@job_level", SqlDbType.Int, 0, Player_Job_leve),
                SqlDBA.MakeInParam("@x", SqlDbType.Float, 0, 人物坐标_X),
                SqlDBA.MakeInParam("@y", SqlDbType.Float, 0, 人物坐标_Y),
                SqlDBA.MakeInParam("@z", SqlDbType.Float, 0, 人物坐标_Z),
                SqlDBA.MakeInParam("@menow", SqlDbType.Int, 0, 人物坐标_地图),
                SqlDBA.MakeInParam("@money", SqlDbType.VarChar, 0, Player_Money),
                SqlDBA.MakeInParam("@hp", SqlDbType.Int, 0, 人物_HP),
                SqlDBA.MakeInParam("@mp", SqlDbType.Int, 0, 人物_MP),
                SqlDBA.MakeInParam("@sp", SqlDbType.Int, 0, 人物_SP),
                SqlDBA.MakeInParam("@wx", SqlDbType.Int, 0, Player_WuXun),
                SqlDBA.MakeInParam("@se", SqlDbType.Int, 0, 人物善恶),
                SqlDBA.MakeInParam("@point", SqlDbType.Int, 0, Player_Qigong_point),
                SqlDBA.MakeInParam("@strSkills", SqlDbType.VarBinary, 20, GetWgCodesbyte()),
                SqlDBA.MakeInParam("@strWearitem", SqlDbType.VarBinary, 2190, GetWEARITEMCodesbyte()),
                SqlDBA.MakeInParam("@strItem", SqlDbType.VarBinary, 4818, GetFLD_ITEMCodesbyte()),
                SqlDBA.MakeInParam("@strQusetItem", SqlDbType.VarBinary, 300, GetQuestITEMCodesbyte()),
                SqlDBA.MakeInParam("@strKongfu", SqlDbType.VarBinary, 312, GetFLD_KONGFUCodesbyte()),
                SqlDBA.MakeInParam("@strCtime", SqlDbType.VarBinary, 160, Get个人药品byte()),
                SqlDBA.MakeInParam("@strDoors", SqlDbType.VarBinary, 1200, Get土灵符byte()),
                SqlDBA.MakeInParam("@strQuest", SqlDbType.VarBinary, 400, Get任务byte()),
                SqlDBA.MakeInParam("@fight_exp", SqlDbType.Int, 0, Player_ExpErience),
                SqlDBA.MakeInParam("@rwqg", SqlDbType.Int, 0, 人物轻功),
                SqlDBA.MakeInParam("@NameType", SqlDbType.VarBinary, 48, 人物名字模版),
                SqlDBA.MakeInParam("@zbver", SqlDbType.Int, 0, Player_LockState),
                SqlDBA.MakeInParam("@strCtimeNew", SqlDbType.VarBinary, 224, Get个人药品Newbyte()),
                SqlDBA.MakeInParam("@vipat", SqlDbType.Int, 0, FLD_VIP_攻击 * 2),
                SqlDBA.MakeInParam("@vipdf", SqlDbType.Int, 0, FLD_VIP_防御 * 2),
                SqlDBA.MakeInParam("@viphp", SqlDbType.Int, 0, 人物_VIP_HP * 2),
                SqlDBA.MakeInParam("@viplevel", SqlDbType.Int, 0, Player_vip_leve),
                SqlDBA.MakeInParam("@zscs", SqlDbType.Int, 0, 护心丹使用时间),
                SqlDBA.MakeInParam("@sjjl", SqlDbType.Int, 0, Player_jllevel),
                SqlDBA.MakeInParam("@rwdj", SqlDbType.Float, 0, 人物任务级别),
                SqlDBA.MakeInParam("@fbcs", SqlDbType.Float, 0, 副本次数),
                SqlDBA.MakeInParam("@primoney", SqlDbType.VarChar, 0, 个人仓库钱数),
                SqlDBA.MakeInParam("@pristrItem", SqlDbType.VarBinary, 4380, Get个人仓库byte()),
                SqlDBA.MakeInParam("@pubmoney", SqlDbType.VarChar, 0, 综合仓库钱数),
                SqlDBA.MakeInParam("@pustrItem", SqlDbType.VarBinary, 4380, Get综合仓库byte()),
                SqlDBA.MakeInParam("@pustrItime", SqlDbType.VarBinary, 50, Get综合仓库品byte()),
                SqlDBA.MakeInParam("@bosscount", SqlDbType.Float, 0, BOSS次数),
                SqlDBA.MakeInParam("@qlname", SqlDbType.VarChar, 0, this.FLD_情侣),
                SqlDBA.MakeInParam("@config", SqlDbType.VarChar, 100, 客户端设置)
                };
                DbPoolClass dbPoolClass = new DbPoolClass();
                dbPoolClass.Conn = DBA.getstrConnection(null);
                dbPoolClass.Prams = prams;
                dbPoolClass.Sql = "UPDATE_USER_DATA_NEW";
                if (DbPoolClass.DbPoolClassRun(dbPoolClass.Conn, dbPoolClass.Sql, dbPoolClass.Prams, dbPoolClass.Type) == -1)
                {
                    return false;
                }
                if (人物灵兽 != null)
                {
                    人物灵兽.保存数据();
                }
                return true;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(100, "保存人物数据NEW出错[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
            return false;
        }
        public void 保存人物的数据()
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "PlayersBes_保存人物的数据()");
            }
            //TimeSpan aaa = DateTime.Now.Subtract(保存time);
            //int sj = (int)aaa.TotalMilliseconds;
            //if (sj < 100)
            //{
            //    return;
            //}
            //保存time = DateTime.Now;
            try
            {
                if (this.UserName == "")
                {
                    return;
                }
                保存人物数据存储过程();
                保存个人仓库存储过程();
                保存综合仓库存储过程();
                if (帮派Id != 0)
                {
                    StringBuilder stringBuilder = new StringBuilder();
                    stringBuilder.AppendFormat("UPDATE TBL_帮派成员 SET FLD_LEVEL = @zw WHERE Name = @Username");
                    SqlParameter[] prams = new SqlParameter[2]
                    {
                            SqlDBA.MakeInParam("@zw", SqlDbType.Int, 0, Player_Level),
                            SqlDBA.MakeInParam("@Username", SqlDbType.VarChar, 30, UserName)
                    };
                    if (DBA.ExeSqlCommand(stringBuilder.ToString(), prams) == -1)
                    {
                        Form1.WriteLine(3, "保存人物帮派等级数据出错[" + Userid + "]-[" + UserName + "]");
                    }
                }
                if (人物灵兽 != null)
                {
                    人物灵兽.保存数据();
                }
                if (师傅数据.TID != -1)
                {
                    保存师徒数据存储过程();
                }
            }
            catch (Exception exception1)
            {
                Form1.WriteLine(1, "保存的数据出错[" + Userid + "]-[" + UserName + "]" + exception1.Message);
            }
        }
 

        public byte[] Get任务byte()
        {
            发包类 发包类 = new 发包类();
            try
            {
                foreach (任务类 value in 任务.Values)
                {
                    发包类.Write2(value.任务ID);
                    发包类.Write2(value.任务阶段ID);
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_Get任务byte[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
            return 发包类.ToArray3();
        }

        public byte[] Get土灵符byte()
        {
            byte[] array = new byte[990];
            try
            {
                foreach (DictionaryEntry item in 土灵符坐标)
                {
                    坐标Class 坐标Class = (坐标Class)item.Value;
                    int num = (int)item.Key;
                    if (num >= 10)
                    {
                        Buffer.BlockCopy(Encoding.Default.GetBytes(坐标Class.Rxjh_name), 0, array, (num - 10) * 32, Encoding.Default.GetBytes(坐标Class.Rxjh_name).Length);
                        Buffer.BlockCopy(BitConverter.GetBytes(坐标Class.Rxjh_Map), 0, array, (num - 10) * 32 + 15, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(坐标Class.Rxjh_X), 0, array, (num - 10) * 32 + 19, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(坐标Class.Rxjh_Y), 0, array, (num - 10) * 32 + 23, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(坐标Class.Rxjh_Z), 0, array, (num - 10) * 32 + 27, 4);
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_Get土灵符byte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] Get个人药品byte()
        {
            int num = 0;
            byte[] array = new byte[160];
            try
            {
                foreach (追加状态类 value in 追加状态列表.Values)
                {
                    if (value.FLD_RESIDE1 == 1)
                    {
                        if (num > 19)
                        {
                            return array;
                        }
                        Buffer.BlockCopy(BitConverter.GetBytes(value.FLD_PID), 0, array, num * 8, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(value.FLD_sj), 0, array, num * 8 + 4, 4);
                        num++;
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_Get个人药品byte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] Get个人药品Newbyte()
        {
            return new byte[224];
        }

        public byte[] Get个人仓库byte()
        {
            byte[] array = new byte[4380];
            try
            {
                for (int i = 0; i < 60; i++)
                {
                    try
                    {
                        byte[] 物品_byte = 个人仓库[i].物品_byte;
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                    catch
                    {
                        byte[] 物品_byte = new byte[37];
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_Get个人仓库byte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] Get综合仓库byte()
        {
            byte[] array = new byte[4380];
            try
            {
                for (int i = 0; i < 60; i++)
                {
                    try
                    {
                        byte[] 物品_byte = 公共仓库[i].物品_byte;
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                    catch
                    {
                        byte[] 物品_byte = new byte[37];
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_Get综合仓库byte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] Get综合仓库品byte()
        {
            byte[] array = new byte[32];
            try
            {
                int num = 0;
                foreach (公有药品类 value in 公有药品.Values)
                {
                    Buffer.BlockCopy(BitConverter.GetBytes(value.药品ID), 0, array, num * 8, 4);
                    Buffer.BlockCopy(BitConverter.GetBytes(value.时间), 0, array, num * 8 + 4, 4);
                    num++;
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_Get综合仓库品byte[" + Userid + "]-[" + UserName + "][" + 公有药品.Count + "]" + ex.Message);
                return array;
            }
        }

        public byte[] GetWgCodesbyte()
        {
            byte[] array = new byte[20];
            try
            {
                for (int i = 0; i < 12; i++)
                {
                    byte[] src;
                    try
                    {
                        src = 气功[i].气功_byte;
                    }
                    catch
                    {
                        src = new byte[2];
                    }
                    Buffer.BlockCopy(src, 0, array, i, 1);
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_GetWgCodesbyte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] GetWEARITEMCodesbyte()
        {
            byte[] array = new byte[2190];
            try
            {
                for (int i = 0; i < 15; i++)
                {
                    try
                    {
                        byte[] 物品_byte = 装备栏已穿装备[i].物品_byte;
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                    catch
                    {
                        byte[] 物品_byte = new byte[37];
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_GetWEARITEMCodesbyte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] GetFLD_ITEMCodesbyte()
        {
            byte[] array = new byte[4818];
            try
            {
                for (int i = 0; i < 66; i++)
                {
                    try
                    {
                        byte[] 物品_byte = 装备栏包裹[i].物品_byte;
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                    catch
                    {
                        byte[] 物品_byte = new byte[37];
                        Buffer.BlockCopy(物品_byte, 0, array, i * 37, 37);
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_GetFLD_ITEMCodesbyte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] GetQuestITEMCodesbyte()
        {
            byte[] array = new byte[288];
            try
            {
                for (int i = 0; i < 36; i++)
                {
                    try
                    {
                        byte[] 物品_byte = 任务物品[i].物品_byte;
                        Buffer.BlockCopy(物品_byte, 0, array, i * 8, 8);
                    }
                    catch
                    {
                        byte[] 物品_byte = new byte[8];
                        Buffer.BlockCopy(物品_byte, 0, array, i * 8, 8);
                    }
                }
                return array;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错GetQuestITEMCodesbyte[" + Userid + "]-[" + UserName + "]" + ex.Message);
                return array;
            }
        }

        public byte[] GetFLD_KONGFUCodesbyte()
        {
            发包类 发包类 = new 发包类();
            try
            {
                for (int i = 0; i < 3; i++)
                {
                    for (int j = 0; j < 32; j++)
                    {
                        if (武功新[i, j] != null)
                        {
                            发包类.Write4(武功新[i, j].FLD_PID);
                            发包类.Write4(武功新[i, j].FLD_PID);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "保存的数据出错_GetFLD_KONGFUCodesbyte[" + Userid + "]-[" + UserName + "]" + ex.Message);
            }
            return 发包类.ToArray3();
        }

        public void 地面物品增加(byte[] itme, float x, float y, float z)
        {
            try
            {
                发包类 发包类 = new 发包类();
                发包类.Write4(1);
                发包类.Write(itme, 0, 16);
                发包类.Write(x);
                发包类.Write(15f);
                发包类.Write(y);
                发包类.Write(itme, 16, 20);
                if (Client != null)
                {
                    Client.SendPak(发包类, 29184, 9999);
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "地面物品增加数据113 出错" + Client.WorldId + "|" + Client.ToString() + " " + ex);
            }
        }

        public void 地面物品增加(Dictionary<long, 地面物品类> Itmes)
        {
            try
            {
                if (Itmes != null && Itmes.Count > 0)
                {
                    using (发包类 发包类 = new 发包类())
                    {
                        发包类.Write4(Itmes.Count);
                        foreach (地面物品类 value in Itmes.Values)
                        {
                            发包类.Write(value.物品_byte, 0, 12);
                            发包类.Write(value.物品_byte, 12, 4);
                            发包类.Write(value.Rxjh_X);
                            发包类.Write(15f);
                            发包类.Write(value.Rxjh_Y);
                            发包类.Write(value.物品_byte, 16, 20);
                        }
                        if (Client != null)
                        {
                            Client.SendPak(发包类, 29184, 9999);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "地面物品增加数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + ex);
            }
        }

        public void 地面物品消失(long 全局ID)
        {
            try
            {
                发包类 发包类 = new 发包类();
                发包类.Write8(全局ID);
                if (Client != null)
                {
                    Client.SendPak(发包类, 29440, 人物全服ID);
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "地面物品消失数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + ex);
            }
        }

        public 发包类 得到更新人物数据(Players Play)
        {
            发包类 发包类 = new 发包类();
            try
            {
                if (Play == null)
                {
                    return null;
                }
                发包类.Write4(1);
                发包类.Write4(Play.人物全服ID);
                float 人物坐标_X = Play.人物坐标_X;
                float 人物坐标_Y = Play.人物坐标_Y;
                //if(Play.FLD_情侣 != "")
                //{
                //    string value = string.Format("{0}{1}", Play.UserName, World.RanString[RNG.Next(0, 13)]);
                //    发包类.WriteName(value);
                //}
                if (World.是否封杀锁人功能 == 1)
                {
                    if (人物PK模式 != 0)
                    {
                        string value = string.Format("{0}{1}", Play.UserName, World.RanString[RNG.Next(0, 13)]);
                        发包类.WriteName(value);
                    }
                    else
                    {
                        发包类.WriteName(Play.UserName);
                    }
                }
                else
                {
                    //string value = string.Format("{0}{1}", Play.UserName, World.RanString[RNG.Next(0, 13)]);
                    发包类.WriteName(Play.UserName);
                }
                发包类.Write(0);
                发包类.Write4(Play.帮派Id);
                发包类.WriteName(Play.帮派名字);
                发包类.Write(Play.帮派人物等级);
                if (Play.帮派门徽 != null)
                {
                    发包类.Write2(World.服务器组ID);
                }
                else
                {
                    发包类.Write2(0);
                }
                发包类.Write(Play.Player_Zx);
                发包类.Write(Play.Player_Level);
                发包类.Write(Play.Player_Job_leve);
                发包类.Write(Play.Player_Job);
                发包类.Write2(1);
                发包类.Write2(Play.New人物模版.发色);
                int num = Play.装备栏已穿装备[11].得到物品头型();
                if (num != 0)
                {
                    发包类.Write1(num);
                }
                else
                {
                    发包类.Write1(Play.New人物模版.发型);
                }
                发包类.Write1(Play.New人物模版.声音);
                发包类.Write2(Play.New人物模版.性别);
                发包类.Write2(0);
                发包类.Write(Play.人物坐标_X);
                发包类.Write(Play.人物坐标_Z);
                发包类.Write(Play.人物坐标_Y);
                发包类.Write4(Play.人物坐标_地图);
                发包类.Write4(BitConverter.ToInt32(Play.装备栏已穿装备[0].物品ID, 0));
                发包类.Write4(BitConverter.ToInt32(Play.装备栏已穿装备[1].物品ID, 0));
                发包类.Write4(BitConverter.ToInt32(Play.装备栏已穿装备[4].物品ID, 0));
                发包类.Write4(BitConverter.ToInt32(Play.装备栏已穿装备[3].物品ID, 0));
                发包类.Write4(Play.装备栏已穿装备[3].FLD_强化数量);
                if (Play.人物坐标_地图 == 801 && World.eve != null)
                {
                    if (Play.势力战临时正邪值 == 1)
                    {
                        if (Play.Player_Sex == 1)
                        {
                            发包类.Write4(16900001);
                        }
                        else
                        {
                            发包类.Write4(26900075);
                        }
                    }
                    if (Play.势力战临时正邪值 == 2)
                    {
                        if (Play.Player_Sex == 1)
                        {
                            发包类.Write4(16900012);
                        }
                        else
                        {
                            发包类.Write4(26900013);
                        }
                    }
                }
                else
                {
                    发包类.Write4(BitConverter.ToInt32(Play.装备栏已穿装备[11].物品ID, 0));
                }
                int num2 = ConfigClass.GetConfig(Play.Config, Play.人物坐标_地图);
                if (Play.追加状态列表 != null && Play.追加状态列表.ContainsKey(700014))
                {
                    num2 += 8;
                }
                发包类.Write(num2);
                发包类.Write(Play.Config.武勋开关);
                发包类.Write2(0);
                发包类.Write(Play.人物坐标_X);
                发包类.Write(Play.人物坐标_Z);
                发包类.Write(Play.人物坐标_Y);
                发包类.Write4(0);
                发包类.Write4(0);
                if (Play.人物灵兽 != null)
                {
                    if (Play.人物灵兽.骑 == 1)
                    {
                        发包类.Write4(3);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                else
                {
                    发包类.Write4(255);
                }
                发包类.Write4(0);
                发包类.Write4(BitConverter.ToInt32(Play.装备栏已穿装备[13].物品ID, 0));
                发包类.Write2(Play.帮派门服字);
                发包类.Write2(Play.帮派门服颜色);
                if (Play.Player_WuXun < 0)
                {
                    Play.Player_WuXun = 0;
                }
                发包类.Write4(Play.Player_WuXun);
                if (Play.人物坐标_地图 == 801)
                {
                    发包类.Write4(0);
                }
                else
                {
                    发包类.Write4(Play.人物善恶);
                }
                发包类.Write2(0);
                if (Play.人物PK模式 != 0)
                {
                    发包类.Write2(15);
                }
                else
                {
                    发包类.Write2(0);
                }
                if (Play.追加状态列表 != null)
                {
                    if (Play.FLD_情侣 != "")
                    {
                        发包类.Write4(2);
                    }
                    else if (Play.个性签名 != "")
                    {
                        发包类.Write4(1);
                    }
                    //else if (Play.追加状态列表.ContainsKey(1008000183))
                    //{
                    //    发包类.Write4(2);
                    //}
                    else if (Play.追加状态列表.ContainsKey(1008000195))
                    {
                        发包类.Write4(4);
                    }
                    else if (Play.追加状态列表.ContainsKey(1008000187))
                    {
                        发包类.Write4(3);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                else
                {
                    if (Play.FLD_情侣 != "")
                    {
                        发包类.Write4(2);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                if (Play.追加状态列表 != null)
                {
                    if (Play.追加状态列表.ContainsKey(1008000252))
                    {
                        发包类.Write4(20);
                    }
                    else if (Play.追加状态列表.ContainsKey(1008000245))
                    {
                        发包类.Write4(8);
                    }
                    else if (Play.追加状态列表.ContainsKey(1008000232))
                    {
                        发包类.Write4(2);
                    }
                    else if (Play.追加状态列表.ContainsKey(1008000188))
                    {
                        发包类.Write4(1);
                    }
                    else
                    {
                        发包类.Write4(0);
                    }
                }
                else
                {
                    发包类.Write4(0);
                }
                发包类.Write4(0);
                发包类.Write4(0);
                return 发包类;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "得到更新人物数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + Converter.ToString(发包类.ToArray3()) + " " + ex);
                return null;
            }
        }

        public void 更新广播人物数据()
        {
            try
            {
                发包类 发包类 = 得到更新人物数据(Client.Player);
                if (发包类 != null)
                {
                    发送当前范围广播数据(发包类, 25600, 人物全服ID);
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "更新广播人物数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + ex);
            }
        }

        public void 更新人物数据(Players Play)
        {
            try
            {
                if (Play.Client != null)
                {
                    发包类 发包类 = 得到更新人物数据(Play);
                    if (发包类 != null && Client != null)
                    {
                        Client.SendPak(发包类, 25600, Play.人物全服ID);
                    }
                    if (Play.Player死亡)
                    {
                        using (发包类 pak = new 发包类())
                        {
                            if (Client != null)
                            {
                                Client.SendPak(pak, 34816, Play.人物全服ID);
                            }
                        }
                    }
                    if (Play.个人商店 != null)
                    {
                        更新个人商店数据(Play);
                    }
                    if (Play.人物灵兽 != null)
                    {
                        更新显示灵兽数据(Play);
                    }
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "更新人物数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + ex);
            }
        }

        public void 更新个人商店数据(Players Play)
        {
            if (!Play.个人商店.个人商店是否开启)
            {
                return;
            }
            发包类 发包类 = new 发包类();
            发包类.Write4(1);
            发包类.Write4(Play.人物全服ID);
            发包类.Write4(Play.人物全服ID);
            发包类.Write2((byte)Play.个人商店.商店名.Length);
            发包类.Write(Play.个人商店.商店名, 0, Play.个人商店.商店名.Length);
            if (Client != null)
            {
                if (Play.个人商店.商店类型 == 1)
                {
                    Client.SendPak(发包类, 51712, 人物全服ID);
                }
                else if (Play.个人商店.商店类型 == 2)
                {
                    Client.SendPak(发包类, 2588, 人物全服ID);
                }
            }
        }

        public void 更换装备位置(int no, int noid, int to, int toid, byte[] itmeid, int sl)
        {
            try
            {
                string hex = "AA554B0001B3041B003C00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CE6155AA";
                byte[] array = Converter.hexStringToByte(hex);
                byte[] bytes = BitConverter.GetBytes(no);
                byte[] bytes2 = BitConverter.GetBytes(noid);
                byte[] bytes3 = BitConverter.GetBytes(to);
                byte[] bytes4 = BitConverter.GetBytes(toid);
                Buffer.BlockCopy(bytes, 0, array, 15, 1);
                Buffer.BlockCopy(bytes2, 0, array, 16, 1);
                Buffer.BlockCopy(bytes3, 0, array, 17, 1);
                Buffer.BlockCopy(bytes4, 0, array, 18, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(sl), 0, array, 19, 1);
                Buffer.BlockCopy(itmeid, 0, array, 23, 16);
                Buffer.BlockCopy(itmeid, 16, array, 51, 20);
                Buffer.BlockCopy(bytes3, 0, array, 43, 1);
                Buffer.BlockCopy(bytes4, 0, array, 44, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 增加物品3(byte[] 物品全局ID, byte[] 物品ID, int 位置, byte[] 数量, byte[] 物品属性)
        {
            try
            {
                ItmeClass value;
                if (World.Itme.TryGetValue(BitConverter.ToInt32(物品ID, 0), out value))
                {
                    string hex = "AA556B0001940223005C00010000008716E567818320060208AF2F000000000100000000000000010F020F00020000470D030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C3E755AA";
                    byte[] array = Converter.hexStringToByte(hex);
                    byte[] array2 = new byte[37];
                    if (value.FLD_SIDE != 0)
                    {
                        byte[] array3 = new byte[4];
                        Buffer.BlockCopy(物品属性, 0, array3, 0, 4);
                        物品类 物品类 = 得到人物物品类型(BitConverter.ToInt32(物品ID, 0), BitConverter.ToInt32(array3, 0));
                        if (物品类 != null)
                        {
                            位置 = 物品类.物品位置;
                            物品全局ID = 物品类.物品全局ID;
                            数量 = BitConverter.GetBytes(BitConverter.ToInt32(物品类.物品数量, 0) + BitConverter.ToInt32(数量, 0));
                        }
                    }
                    else
                    {
                        数量 = BitConverter.GetBytes(1);
                    }
                    Buffer.BlockCopy(物品全局ID, 0, array2, 0, 8);
                    Buffer.BlockCopy(物品ID, 0, array2, 8, 4);
                    Buffer.BlockCopy(数量, 0, array2, 12, 4);
                    Buffer.BlockCopy(物品属性, 0, array2, 16, 物品属性.Length);
                    Buffer.BlockCopy(BitConverter.GetBytes(位置), 0, array, 40, 2);
                    Buffer.BlockCopy(array2, 0, array, 15, 12);
                    Buffer.BlockCopy(array2, 12, array, 31, 4);
                    Buffer.BlockCopy(array2, 16, array, 47, 物品属性.Length);
                    装备栏包裹[位置].物品_byte = array2;
                    Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                    if (Client != null)
                    {
                        Client.Send(array, array.Length);
                    }
                }
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "增加物品出错2 [" + Userid + "][" + UserName + "] 位置[" + 位置 + "] 数量[" + BitConverter.ToInt32(数量, 0) + "]" + ex.Message);
            }
        }
        public void 物品使用(int 背包ID, int 位置, int 数量)
        {
            // 背包ID 人1  宠物0
            string hex = "AA5523000000003B001400010A000065CA9A3B010000006100000000000000000000000000000055AAA";
            byte[] array = Converter.hexStringToByte(hex);
            byte[] bytes = BitConverter.GetBytes(位置);
            BitConverter.GetBytes(数量);
            byte[] array2 = new byte[4];
            byte[] src = (背包ID != 1) ? 人物灵兽.宠物装备栏[位置].物品ID : 装备栏包裹[位置].物品ID;
            int num = BitConverter.ToInt32(src, 0);
            byte[] bytes2;
            if (背包ID == 1)
            {
                if (BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) <= 数量)
                {
                    装备栏包裹[位置].物品_byte = new byte[37];
                    bytes2 = BitConverter.GetBytes(0);
                }
                else
                {
                    bytes2 = BitConverter.GetBytes(BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) - 数量);
                    装备栏包裹[位置].物品数量 = bytes2;
                }
            }
            else if (BitConverter.ToInt32(人物灵兽.宠物装备栏[位置].物品数量, 0) <= 数量)
            {
                人物灵兽.宠物装备栏[位置].物品_byte = new byte[37];
                bytes2 = BitConverter.GetBytes(0);
            }
            else
            {
                bytes2 = BitConverter.GetBytes(BitConverter.ToInt32(人物灵兽.宠物装备栏[位置].物品数量, 0) - 数量);
                人物灵兽.宠物装备栏[位置].物品数量 = bytes2;
            }
            if ((num == 1000000101 || num == 1000000102 || num == 1000000103 || num == 1000000104 || num == 1000000105 || num == 1000000106 || num == 1000000185 || num == 1000000186) && BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) > 9999)
            {
                bytes2 = BitConverter.GetBytes(9999);
                装备栏包裹[位置].物品数量 = bytes2;
            }
            Buffer.BlockCopy(BitConverter.GetBytes(背包ID), 0, array, 11, 1);
            Buffer.BlockCopy(bytes, 0, array, 12, 2);
            Buffer.BlockCopy(src, 0, array, 15, 4);
            Buffer.BlockCopy(bytes2, 0, array, 23, 4);
            if (装备栏包裹[位置].Get物品ID == 1700101)
            {
                Buffer.BlockCopy(BitConverter.GetBytes(111), 0, array, 27, 4);
            }
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }
        //public void 物品使用(int 位置, int 数量)
        //{
        //    bbg物品类 value;
        //    World.百宝阁物品.TryGetValue(装备栏包裹[位置].Get物品ID, out value);
        //    if (BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) <= 数量)
        //    {
        //        装备栏包裹[位置].物品_byte = new byte[37];
        //    }
        //    else
        //    {
        //        装备栏包裹[位置].物品数量 = BitConverter.GetBytes(BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) - 数量);
        //    }
        //    发包类 发包类 = new 发包类();
        //    发包类.Write1(1);
        //    发包类.Write1(位置);
        //    发包类.Write2(0);
        //    发包类.Write4(装备栏包裹[位置].Get物品ID);
        //    if (数量 == 0)
        //    {
        //        发包类.Write4(装备栏包裹[位置].Get物品数量);
        //    }
        //    else
        //    {
        //        发包类.Write4(数量);
        //    }
        //    发包类.Write4(装备栏包裹[位置].Get物品数量);
        //    发包类.Write4(0);
        //    if (Client != null)
        //    {
        //        Client.SendPak(发包类, 15104, 人物全服ID);
        //    }
        //}

        public void 物品使用千年雪参(int 位置, int 数量)
        {
            try
            {
                string hex = "AA5523000000003B001400010A000065CA9A3B010000000100000000000000000000000000000055AAA";
                byte[] array = Converter.hexStringToByte(hex);
                byte[] array2 = new byte[4];
                Buffer.BlockCopy(装备栏包裹[位置].物品_byte, 20, array2, 0, 4);
                int num = BitConverter.ToInt32(array2, 0) - 2010000000 - 数量;
                Buffer.BlockCopy(BitConverter.GetBytes(位置), 0, array, 12, 2);
                Buffer.BlockCopy(装备栏包裹[位置].物品ID, 0, array, 15, 4);
                if (num <= 0)
                {
                    if (BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) <= 1)
                    {
                        Buffer.BlockCopy(BitConverter.GetBytes(2010000000), 0, array, 27, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(0), 0, array, 23, 4);
                        装备栏包裹[位置].物品_byte = new byte[37];
                    }
                    else
                    {
                        int value = BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) - 1;
                        装备栏包裹[位置].物品数量 = BitConverter.GetBytes(value);
                        Buffer.BlockCopy(BitConverter.GetBytes(2010600000), 0, 装备栏包裹[位置].物品_byte, 20, 4);
                        Buffer.BlockCopy(装备栏包裹[位置].物品数量, 0, array, 23, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(2010600000), 0, array, 27, 4);
                    }
                }
                else
                {
                    Buffer.BlockCopy(BitConverter.GetBytes(num + 2010000000), 0, 装备栏包裹[位置].物品_byte, 20, 4);
                    Buffer.BlockCopy(装备栏包裹[位置].物品数量, 0, array, 23, 4);
                    Buffer.BlockCopy(BitConverter.GetBytes(num + 2010000000), 0, array, 27, 4);
                }
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送门徽2(byte[] _门徽, int id)
        {
            string hex = "AA551903010A00EB000A036A42020001000100FF00FFFF00FF0000FF0000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFF80FF00FFFFFF80FFFF80FFFF80FFFF80FF00FFFF00FF0000FF0000FF0000FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFF80FF00FFFFFF80FFFF80FFFF80FFFF80FF00FFFF00FF0000FFFF00FF0000FFFF00FF0000FFFF00FFFF00FFFFFF80FF00FFFFFF80FFFF80FFFF80FF00FFFFFF80FF00FFFF00FF0000FFFF00FF0000FFFF00FF0000FFFF00FFFF00FFFFFF80FFFF80FFFF80FFFF80FF00FFFFFF80FFFF80FF00FFFF00FF0000FFFF00FF0000FF0000FF0000FFFF00FFFF00FFFFFF80FFFF80FFFF80FFFF80FF00FFFFFF80FFFF80FF00FFFF00FF0000FFFF00FFFF00FF0000FF0000FF0000FFFFFF80FFFF80FFFF80FFFF80FFFF80FFFF80FFFF80FF00FFFF00FFFF00FF0000FFFF00FFFF00FF0000FFFF00FF0000FFFFFF80FFFF80FF0000FFFF80FFFF80FFFF80FFFF80FF0000FF00FFFF0000FF0000FF0000FF0000FF0000FF0000FFFF80FFFF80FF0000FF0000FFFF80FFFF80FFFF80FF00FFFF00FFFF00FFFF00FFFF0000FF0000FF0000FF0000FFFF80FF0000FFFF80FF0000FF0000FFFF80FFFF80FFFF80FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFF80FF0000FF0000FFFF80FF0000FF0000FFFF80FFFF80FF0000FF0000FF0000FF00FFFF00FF0000FFFF00FFFFFF80FF00FFFF00FF0000FFFFFF80FF00FFFFFF80FFFF80FF0000FF0000FF00FFFF00FFFF0000FF0000FFFF80FFFF80FF0000FF0000FF0000FF0000FFFF80FFFF80FF0000FF0000FF0000FF0000FF0000FF0000FF00FFFF00FF0000FFFF00FFFF00FFFF00FFFF00FFFF00FFFFFF80FF00FFFF0000FF0000FF0000FF0000FF0000FF00FFFF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FFFF80FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00FFFF00FFFF00FFFF00FFFF00FFFF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF00000000000000000000BC6F55AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(_门徽, 0, array, 19, _门徽.Length);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 11, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(World.服务器组ID), 0, array, 17, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            Client.Send(array, array.Length);
        }

        public void 更新攻击速度()
        {
            string hex = "AA551B0000B20206200C00060000008801580064000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(FLD_攻击速度), 0, array, 19, 4);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
            发送当前范围广播数据(array, array.Length);
        }

        public void 魔法不足提示()
        {
            string hex = "AA5517000000003D0008000E2C090002000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 解除召唤(Players TOPlaye, Players Playe)
        {
            string hex = "AA55170001549C6300080001000000549C0001000000000000A37B55AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(Playe.人物灵兽.全服ID), 0, array, 15, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(TOPlaye.人物全服ID), 0, array, 5, 2);
            if (TOPlaye.Client != null)
            {
                TOPlaye.Client.Send多包(array, array.Length);
            }
            发送当前范围广播数据(array, array.Length);
        }

        public void 解除召唤2(Players TOPlaye, Players Playe)
        {
            string hex = "AA55170001549C6300080001000000549C0001000000000000A37B55AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(Playe.人物灵兽.全服ID), 0, array, 15, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(TOPlaye.人物全服ID), 0, array, 5, 2);
            if (TOPlaye.Client != null)
            {
                TOPlaye.Client.Send多包(array, array.Length);
            }
        }

        public void 离开当前地图(Players Playe, Players ToPlaye)
        {
            try
            {
                string hex = "AA551700000300630008000100000003000001000000000000000055AA";
                byte[] array = Converter.hexStringToByte(hex);
                byte[] bytes = BitConverter.GetBytes(ToPlaye.人物全服ID);
                Buffer.BlockCopy(bytes, 0, array, 15, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(Playe.人物全服ID), 0, array, 5, 2);
                if (Playe.Client != null)
                {
                    Playe.Client.Send多包(array, array.Length);
                }
                if (ToPlaye.人物灵兽 != null)
                {
                    解除召唤2(Playe, ToPlaye);
                }
            }
            catch
            {
            }
        }

        public void 发送组队消息广播数据(byte[] data, int length, Dictionary<int, Players> 组队列表)
        {
            try
            {
                foreach (Players value in 组队列表.Values)
                {
                    if (World.allConnectedChars.ContainsKey(value.人物全服ID) && value.Client != null)
                    {
                        value.Client.Send(data, length);
                    }
                }
            }
            catch
            {
            }
        }

        public void 发送传音消息数据(byte[] Msg, int Length, string name, string msg, int msgType)
        {
            try
            {
                Players players = World.检查玩家name(name);
                if (players != null)
                {
                    if (players.Config.传音 == 0)
                    {
                        系统提示("对方设置不容许传音", 9, "系统提示");
                    }
                    else
                    {
                        if (Client != null)
                        {
                            Client.Send(Msg, Length);
                        }
                        发送传音消息(players, msg, msgType);
                    }
                }
                else if (World.是否开启跨线传音 == 1)
                {
                    World.conn.发送("传音|" + 人物全服ID + "|" + UserName + "|" + name + "|" + msg);
                }
            }
            catch
            {
            }
        }

        public void 发送传音消息(Players ToPlaye, string msg, int msgType)
        {
            try
            {
                string hex = "AA55A6000000006600970000C8CEBDDC0000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA";
                byte[] array = Converter.hexStringToByte(hex);
                array[11] = (byte)msgType;
                byte[] bytes = Encoding.Default.GetBytes(UserName);
                byte[] bytes2 = Encoding.Default.GetBytes(msg);
                Buffer.BlockCopy(bytes2, 0, array, 34, bytes2.Length);
                Buffer.BlockCopy(bytes, 0, array, 12, bytes.Length);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (ToPlaye.Client != null)
                {
                    ToPlaye.Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送势力战消息2()
        {
            try
            {
                string hex = "AA551C0001A205BA000D000303271806FFFF0000FFFF000000000000000059DF55AA";
                byte[] array = Converter.hexStringToByte(hex);
                Buffer.BlockCopy(BitConverter.GetBytes(2), 0, array, 11, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战时间), 0, array, 14, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战正分数), 0, array, 16, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战邪分数), 0, array, 20, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送势力战消息()
        {
            try
            {
                string hex = "AA551C0001A205BA000D000303271806FFFF0000FFFF000000000000000059DF55AA";
                byte[] array = Converter.hexStringToByte(hex);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战进程), 0, array, 11, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战时间), 0, array, 14, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战正分数), 0, array, 16, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战邪分数), 0, array, 20, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送势力战消息1()
        {
            try
            {
                string hex = "AA551E00015400B7000F000212270300000064000000640002000000000000008E1B55AA";
                byte[] array = Converter.hexStringToByte(hex);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送势力战快开始消息(int kssjint)
        {
            try
            {
                string hex = "AA551C0001A205BA000D00020000100E0000000000000000000000000000AC4155AA";
                byte[] array = Converter.hexStringToByte(hex);
                Buffer.BlockCopy(BitConverter.GetBytes(kssjint), 0, array, 14, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战进程), 0, array, 11, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战正分数), 0, array, 16, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战邪分数), 0, array, 20, 4);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送势力战结束消息(int kssjint)
        {
            try
            {
                string hex = "AA551B0001B902BA000C00041127031200000018000000000000000000822255AA";
                byte[] array = Converter.hexStringToByte(hex);
                switch (kssjint)
                {
                    case 1:
                        if (World.势力战进程 != 0)
                        {
                            if (Player_Zx == 1 || 势力战派别== "仙族")
                            {
                                Buffer.BlockCopy(BitConverter.GetBytes(2), 0, array, 14, 1);
                            }
                            else
                            {
                                Buffer.BlockCopy(BitConverter.GetBytes(1), 0, array, 14, 1);
                            }
                        }
                        break;
                    case 2:
                        if (World.势力战进程 != 0)
                        {
                            if (Player_Zx == 1 || 势力战临时正邪值 == 1)
                            {
                                Buffer.BlockCopy(BitConverter.GetBytes(1), 0, array, 14, 1);
                            }
                            else
                            {
                                Buffer.BlockCopy(BitConverter.GetBytes(2), 0, array, 14, 1);
                            }
                        }
                        break;
                    case 3:
                        Buffer.BlockCopy(BitConverter.GetBytes(3), 0, array, 14, 1);
                        break;
                }
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战进程), 0, array, 11, 1);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战正分数), 0, array, 15, 4);
                Buffer.BlockCopy(BitConverter.GetBytes(World.势力战邪分数), 0, array, 19, 4);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 发送势力战关闭消息()
        {
            try
            {
                string hex = "AA551C0001A205BA000D0006132700000000000000000000000000000000AC4155AA";
                byte[] array = Converter.hexStringToByte(hex);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 系统倒计时(int kg, int sj)
        {
            string hex = "AA551700003B02BB18080001000100B0040000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(kg), 0, array, 13, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(sj), 0, array, 15, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 发送帮派消息(string BpName, byte[] data, int length)
        {
            try
            {
                foreach (Players value in World.allConnectedChars.Values)
                {
                    if (value.帮派名字 == BpName && value.Client != null)
                    {
                        value.Client.Send(data, length);
                    }
                }
            }
            catch
            {
            }
        }

        public Players 得到人物数据(int 人物ID)
        {
            Players value;
            if (World.allConnectedChars.TryGetValue(人物ID, out value))
            {
                return value;
            }
            return null;
        }

        public Players 得到人物数据(string 人物名)
        {
            try
            {
                foreach (Players value in World.allConnectedChars.Values)
                {
                    if (value.UserName == 人物名)
                    {
                        return value;
                    }
                }
                return null;
            }
            catch
            {
                return null;
            }
        }

        public int 得到包裹空位(Players Playe)
        {
            int num = 36;
            for (int i = 0; i < num; i++)
            {
                if (BitConverter.ToInt32(Playe.装备栏包裹[i].物品ID, 0) == 0)
                {
                    return i;
                }
            }
            return -1;
        }

        public int 得到包裹空位位置()
        {
            for (int i = 0; i < 36; i++)
            {
                if (BitConverter.ToInt32(装备栏包裹[i].物品ID, 0) == 0)
                {
                    return i;
                }
            }
            return -1;
        }

        public List<int> 得到包裹空位位置组(int 数量)
        {
            int num = 0;
            List<int> list = new List<int>();
            for (int i = 0; i < 36; i++)
            {
                if (BitConverter.ToInt32(装备栏包裹[i].物品ID, 0) == 0)
                {
                    num++;
                    list.Add(i);
                    if (num >= 数量)
                    {
                        break;
                    }
                }
            }
            return list;
        }

        public int 得到包裹空位数()
        {
            int num = 0;
            for (int i = 0; i < 36; i++)
            {
                if (BitConverter.ToInt32(装备栏包裹[i].物品ID, 0) == 0)
                {
                    num++;
                }
            }
            return num;
        }

        public 物品类 得到人物公共仓库类型(int id, int 仓库类型)
        {
            if (仓库类型 == 3)
            {
                物品类[] array = 个人仓库;
                foreach (物品类 物品类 in array)
                {
                    if (BitConverter.ToInt32(物品类.物品ID, 0) == id)
                    {
                        return 物品类;
                    }
                }
            }
            else
            {
                物品类[] array2 = 公共仓库;
                foreach (物品类 物品类2 in array2)
                {
                    if (BitConverter.ToInt32(物品类2.物品ID, 0) == id)
                    {
                        return 物品类2;
                    }
                }
            }
            return null;
        }

        public 物品类 得到人物公共仓库类型(int id, int 仓库类型, int magic0)
        {
            if (仓库类型 == 3)
            {
                物品类[] array = 个人仓库;
                foreach (物品类 物品类 in array)
                {
                    if (BitConverter.ToInt32(物品类.物品ID, 0) == id && 物品类.FLD_MAGIC0 == magic0)
                    {
                        return 物品类;
                    }
                }
            }
            else
            {
                物品类[] array2 = 公共仓库;
                foreach (物品类 物品类2 in array2)
                {
                    if (BitConverter.ToInt32(物品类2.物品ID, 0) == id && 物品类2.FLD_MAGIC0 == magic0)
                    {
                        return 物品类2;
                    }
                }
            }
            return null;
        }

        public 物品类 得到人物物品物品全局ID(Players Playe, long 物品全局ID)
        {
            物品类[] array = Playe.装备栏包裹;
            foreach (物品类 物品类 in array)
            {
                if (物品类.Get物品全局ID == 物品全局ID)
                {
                    return 物品类;
                }
            }
            return null;
        }

        public 物品类 得到人物物品类型(int id)
        {
            物品类[] array = 装备栏包裹;
            foreach (物品类 物品类 in array)
            {
                if (物品类.Get物品ID == id)
                {
                    return 物品类;
                }
            }
            return null;
        }

        public 物品类 得到人物物品类型(int id, int fld_magic0)
        {
            物品类[] array = 装备栏包裹;
            foreach (物品类 物品类 in array)
            {
                if (物品类.Get物品ID == id)
                {
                    return 物品类;
                }
            }
            return null;
        }

        public void 加血(int sl)
        {
            if (Player_Job == 3)
            {
                double num = sl;
                sl = (int)(num * (1.0 + base.枪_运气疗伤));
            }
            if (人物_HP + sl < 人物最大_HP)
            {
                人物_HP += sl;
            }
            else
            {
                人物_HP = 人物最大_HP;
            }
        }

        public void 加魔(int sl)
        {
            if (Player_Job == 5)
            {
                double num = sl;
                sl = (int)(num * (1.0 + base.医_运气疗心));
            }
            if (人物_MP + sl < 人物最大_MP)
            {
                人物_MP += sl;
            }
            else
            {
                人物_MP = 人物最大_MP;
            }
        }

        public void 新吃药提示()
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(1025);
            发包类.Write8(1008000093L);
            发包类.Write4(3);
            发包类.Write4(1);
            发包类.Write4(2000000012);
            发包类.Write4(0);
            if (Client != null)
            {
                Client.SendPak(发包类, 15104, 人物全服ID);
            }
        }

        public void 得到钱的提示(uint 数量)
        {
            if (数量 >= 0 && 数量 <= 2000000000)
            {
                string hex = "AA5543000000000D00340001000000000000000000000000943577280A00000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA";
                byte[] array = Converter.hexStringToByte(hex);
                byte[] bytes = BitConverter.GetBytes(数量);
                Buffer.BlockCopy(bytes, 0, array, 27, bytes.Length);
                Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
        }

        public void 升级后的提示()
        {
            string hex = "AA551100000000770002000701000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            byte[] bytes = BitConverter.GetBytes(Player_Level);
            Buffer.BlockCopy(bytes, 0, array, 11, bytes.Length);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
            发送当前范围广播数据(array, array.Length);
        }

        public void 分解物品提示(int id)
        {
            string hex = "AA551300013B0231170400FEFFFFFF000000000000B0EB55AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 11, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 购买物品提示(int id)
        {
            string hex = "AA55170000000093000800050000000E000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 15, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 捡物品提示(int id, long 物品全局ID)
        {
            string hex = "AA551B000000000D000C00030000006843030000000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 11, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(物品全局ID), 0, array, 15, 8);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 商店提示(int id)
        {
            string hex = "AA551600000000CF000600030313050000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 组队传送符提示(int id)
        {
            string hex = "AA55230001D001121614000106000078DC143C010000000100000009943577000000000000A65455AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 19, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 帮派传送符提示(int id)
        {
            string hex = "AA55230001D001121614000106000078DC143C010000000100000009943577000000000000A65455AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 19, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 系统提示(string msg, int msgType, string name)
        {
            string hex = "AA55A6000000006600970000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            array[11] = (byte)msgType;
            byte[] bytes = Encoding.Default.GetBytes(name);
            byte[] bytes2 = Encoding.Default.GetBytes(msg);
            Buffer.BlockCopy(bytes, 0, array, 12, bytes.Length);
            Buffer.BlockCopy(bytes2, 0, array, 34, bytes2.Length);
            Buffer.BlockCopy(BitConverter.GetBytes(0), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 装逼提示(string msg, int msgType, string name)
        {
            string hex = "AA55A6000000006600970000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            array[11] = (byte)msgType;
            byte[] bytes = Encoding.Default.GetBytes(string.Empty);
            byte[] bytes2 = Encoding.Default.GetBytes(msg);
            Buffer.BlockCopy(bytes, 0, array, 12, bytes.Length);
            Buffer.BlockCopy(bytes2, 0, array, 34, bytes2.Length);
            Buffer.BlockCopy(BitConverter.GetBytes(0), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void OpClient(int iOpCode)
        {
            string hex = "AA551300000100BB00040001000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(iOpCode), 0, array, 11, 2);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
            Thread.Sleep(100);
        }

        public void 系统公告(string msg)
        {
            string hex = "AA55A600000F2766009700082020202020302020202020203130202020202020304DB1BE000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            byte[] bytes = Encoding.Default.GetBytes(msg);
            Buffer.BlockCopy(bytes, 0, array, 34, bytes.Length);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 系统滚动公告(string msg)
        {
            string hex = "AA55A60000F203660097000820202020203120202020202031202020202020302080312E320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            byte[] bytes = Encoding.Default.GetBytes(msg);
            Buffer.BlockCopy(bytes, 0, array, 34, bytes.Length);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public virtual void 发送当前范围广播数据(byte[] data, int length)
        {
        }

        public virtual void 发送当前范围广播数据(发包类 pak, int id, int wordid)
        {
        }

        private string 得到强化字符(string ysqh)
        {
            string result = "";
            if (ysqh.Length == 6)
            {
                int num = int.Parse(ysqh.Substring(ysqh.Length - 2, 2));
                switch (ysqh.Substring(0, 1))
                {
                    case "1":
                        result = "攻击力+" + num.ToString() + " ";
                        break;
                    case "2":
                        result = "防御力+" + num.ToString() + " ";
                        break;
                    case "3":
                        result = "生命力+" + num.ToString() + " ";
                        break;
                    case "4":
                        result = "内功力+" + num.ToString() + " ";
                        break;
                    case "5":
                        result = "命中率+" + num.ToString() + " ";
                        break;
                    case "6":
                        result = "回避率+" + num.ToString() + " ";
                        break;
                    case "7":
                        result = "武功攻击力+" + num.ToString() + "% ";
                        break;
                    case "8":
                        switch (int.Parse(ysqh.Substring(2, 2)))
                        {
                            case 0:
                                result = "全部气功等级+" + num.ToString() + " ";
                                break;
                            case 10:
                                result = "力劈华山+" + num.ToString() + " ";
                                break;
                            case 11:
                                result = "摄魂一击+" + num.ToString() + " ";
                                break;
                            case 12:
                                result = "连环飞舞+" + num.ToString() + " ";
                                break;
                            case 13:
                                result = "必杀一击+" + num.ToString() + " ";
                                break;
                            case 14:
                                result = "狂风万破+" + num.ToString() + " ";
                                break;
                            case 15:
                                result = "四两千斤+" + num.ToString() + " ";
                                break;
                            case 16:
                                result = "霸气破甲+" + num.ToString() + " ";
                                break;
                            case 17:
                                result = "真武绝击+" + num.ToString() + " ";
                                break;
                            case 18:
                                result = "暗影绝杀+" + num.ToString() + " ";
                                break;
                            case 19:
                                result = "稳如泰山+" + num.ToString() + " ";
                                break;
                            case 110:
                                result = "流光乱舞+" + num.ToString() + " ";
                                break;
                            case 20:
                                result = "长虹贯日+" + num.ToString() + " ";
                                break;
                            case 21:
                                result = "百变神行+" + num.ToString() + " ";
                                break;
                            case 22:
                                result = "连环飞舞+" + num.ToString() + " ";
                                break;
                            case 23:
                                result = "必杀一击+" + num.ToString() + " ";
                                break;
                            case 24:
                                result = "狂风万破+" + num.ToString() + " ";
                                break;
                            case 25:
                                result = "护身罡气+" + num.ToString() + " ";
                                break;
                            case 26:
                                result = "移花接木+" + num.ToString() + " ";
                                break;
                            case 27:
                                result = "回柳身法+" + num.ToString() + " ";
                                break;
                            case 28:
                                result = "怒海狂澜+" + num.ToString() + " ";
                                break;
                            case 29:
                                result = "冲冠一怒+" + num.ToString() + " ";
                                break;
                            case 120:
                                result = "无坚不摧+" + num.ToString() + " ";
                                break;
                            case 30:
                                result = "金钟罩气+" + num.ToString() + " ";
                                break;
                            case 31:
                                result = "运气疗伤+" + num.ToString() + " ";
                                break;
                            case 32:
                                result = "连环飞舞+" + num.ToString() + " ";
                                break;
                            case 33:
                                result = "必杀一击+" + num.ToString() + " ";
                                break;
                            case 34:
                                result = "狂风万破+" + num.ToString() + " ";
                                break;
                            case 35:
                                result = "横练太保+" + num.ToString() + " ";
                                break;
                            case 36:
                                result = "乾坤挪移+" + num.ToString() + " ";
                                break;
                            case 37:
                                result = "灵甲护身+" + num.ToString() + " ";
                                break;
                            case 38:
                                result = "狂神降世+" + num.ToString() + " ";
                                break;
                            case 39:
                                result = "转守为攻+" + num.ToString() + " ";
                                break;
                            case 130:
                                result = "末日狂舞+" + num.ToString() + " ";
                                break;
                            case 40:
                                result = "百步穿杨+" + num.ToString() + " ";
                                break;
                            case 41:
                                result = "猎鹰之眼+" + num.ToString() + " ";
                                break;
                            case 42:
                                result = "弓凝神聚气+" + num.ToString() + " ";
                                break;
                            case 43:
                                result = "必杀一击+" + num.ToString() + " ";
                                break;
                            case 44:
                                result = "狂风万破+" + num.ToString() + " ";
                                break;
                            case 45:
                                result = "正本培元+" + num.ToString() + " ";
                                break;
                            case 46:
                                result = "心神凝聚+" + num.ToString() + " ";
                                break;
                            case 47:
                                result = "流星三矢+" + num.ToString() + " ";
                                break;
                            case 48:
                                result = "锐利之箭+" + num.ToString() + " ";
                                break;
                            case 49:
                                result = "弓无明暗矢+" + num.ToString() + " ";
                                break;
                            case 140:
                                result = "致命绝杀+" + num.ToString() + " ";
                                break;
                            case 50:
                                result = "运气行心+" + num.ToString() + " ";
                                break;
                            case 51:
                                result = "太极心法+" + num.ToString() + " ";
                                break;
                            case 52:
                                result = "体血倍增+" + num.ToString() + " ";
                                break;
                            case 53:
                                result = "洗髓易经+" + num.ToString() + " ";
                                break;
                            case 54:
                                result = "妙手回春+" + num.ToString() + " ";
                                break;
                            case 55:
                                result = "长功攻击+" + num.ToString() + " ";
                                break;
                            case 56:
                                result = "吸星大法+" + num.ToString() + " ";
                                break;
                            case 57:
                                result = "必杀一击+" + num.ToString() + " ";
                                break;
                            case 58:
                                result = "天佑之气+" + num.ToString() + " ";
                                break;
                            case 59:
                                result = "九天真气+" + num.ToString() + " ";
                                break;
                            case 150:
                                result = "万物回春+" + num.ToString() + " ";
                                break;
                        }
                        break;
                    case "9":
                        result = "升级成功率+" + num.ToString() + "% ";
                        break;
                    case "12":
                        result = "获得金钱+" + num.ToString() + "% ";
                        break;
                    case "13":
                        result = "死亡损失经验减少" + num.ToString() + "% ";
                        break;
                    case "15":
                        result = "经验获得+" + num.ToString() + "% ";
                        break;
                }
            }
            else if (ysqh.Length == 7)
            {
                int num = int.Parse(ysqh.Substring(ysqh.Length - 2, 2));
                switch (ysqh.Substring(0, 2))
                {
                    case "10":
                        result = "追加伤害+" + num.ToString() + " ";
                        break;
                    case "11":
                        result = "武功防御+" + num.ToString() + " ";
                        break;
                }
            }
            else if (ysqh.Length == 8)
            {
                result = "强化:" + int.Parse(ysqh.Substring(ysqh.Length - 2, 2)).ToString();
            }
            else if (ysqh.Length == 10)
            {
                int num2 = int.Parse(ysqh.Substring(ysqh.Length - 4, 1));
                int num3 = int.Parse(ysqh.Substring(ysqh.Length - 3, 1)) + 1;
                int num = int.Parse(ysqh.Substring(ysqh.Length - 2, 2));
                switch (num2)
                {
                    case 1:
                        result = "火+" + num3.ToString() + " 强化+" + num.ToString() + " ";
                        break;
                    case 2:
                        result = "水+" + num3.ToString() + " 强化+" + num.ToString() + " ";
                        break;
                    case 3:
                        result = "风+" + num3.ToString() + " 强化+" + num.ToString() + " ";
                        break;
                    case 4:
                        result = "内+" + num3.ToString() + " 强化+" + num.ToString() + " ";
                        break;
                    case 5:
                        result = "外+" + num3.ToString() + " 强化+" + num.ToString() + " ";
                        break;
                    case 6:
                        result = "毒+" + num3.ToString() + " 强化+" + num.ToString() + " ";
                        break;
                }
            }
            return result;
        }

        private string 得到属性字符(string ysqh)
        {
            string result = "";
            switch (ysqh.Length)
            {
                case 6:
                    {
                        int num = int.Parse(ysqh.Substring(ysqh.Length - 2, 2));
                        switch (ysqh.Substring(0, 1))
                        {
                            case "1":
                                result = "攻击力+" + num.ToString() + " ";
                                break;
                            case "2":
                                result = "防御力+" + num.ToString() + " ";
                                break;
                            case "3":
                                result = "生命力+" + num.ToString() + " ";
                                break;
                            case "4":
                                result = "内功力+" + num.ToString() + " ";
                                break;
                            case "5":
                                result = "命中率+" + num.ToString() + " ";
                                break;
                            case "6":
                                result = "回避率+" + num.ToString() + " ";
                                break;
                            case "7":
                                result = "武功攻击力+" + num.ToString() + "% ";
                                break;
                            case "8":
                                switch (int.Parse(ysqh.Substring(2, 2)))
                                {
                                    case 0:
                                        result = "全部气功等级+" + num.ToString() + " ";
                                        break;
                                    case 10:
                                        result = "力劈华山+" + num.ToString() + " ";
                                        break;
                                    case 11:
                                        result = "摄魂一击+" + num.ToString() + " ";
                                        break;
                                    case 12:
                                        result = "连环飞舞+" + num.ToString() + " ";
                                        break;
                                    case 13:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 14:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 15:
                                        result = "四两千斤+" + num.ToString() + " ";
                                        break;
                                    case 16:
                                        result = "霸气破甲+" + num.ToString() + " ";
                                        break;
                                    case 17:
                                        result = "真武绝击+" + num.ToString() + " ";
                                        break;
                                    case 18:
                                        result = "暗影绝杀+" + num.ToString() + " ";
                                        break;
                                    case 19:
                                        result = "稳如泰山+" + num.ToString() + " ";
                                        break;
                                    case 110:
                                        result = "流光乱舞+" + num.ToString() + " ";
                                        break;
                                    case 20:
                                        result = "长虹贯日+" + num.ToString() + " ";
                                        break;
                                    case 21:
                                        result = "百变神行+" + num.ToString() + " ";
                                        break;
                                    case 22:
                                        result = "连环飞舞+" + num.ToString() + " ";
                                        break;
                                    case 23:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 24:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 25:
                                        result = "护身罡气+" + num.ToString() + " ";
                                        break;
                                    case 26:
                                        result = "移花接木+" + num.ToString() + " ";
                                        break;
                                    case 27:
                                        result = "回柳身法+" + num.ToString() + " ";
                                        break;
                                    case 28:
                                        result = "怒海狂澜+" + num.ToString() + " ";
                                        break;
                                    case 29:
                                        result = "冲冠一怒+" + num.ToString() + " ";
                                        break;
                                    case 120:
                                        result = "无坚不摧+" + num.ToString() + " ";
                                        break;
                                    case 30:
                                        result = "金钟罩气+" + num.ToString() + " ";
                                        break;
                                    case 31:
                                        result = "运气疗伤+" + num.ToString() + " ";
                                        break;
                                    case 32:
                                        result = "连环飞舞+" + num.ToString() + " ";
                                        break;
                                    case 33:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 34:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 35:
                                        result = "横练太保+" + num.ToString() + " ";
                                        break;
                                    case 36:
                                        result = "乾坤挪移+" + num.ToString() + " ";
                                        break;
                                    case 37:
                                        result = "灵甲护身+" + num.ToString() + " ";
                                        break;
                                    case 38:
                                        result = "狂神降世+" + num.ToString() + " ";
                                        break;
                                    case 39:
                                        result = "转守为攻+" + num.ToString() + " ";
                                        break;
                                    case 130:
                                        result = "末日狂舞+" + num.ToString() + " ";
                                        break;
                                    case 40:
                                        result = "百步穿杨+" + num.ToString() + " ";
                                        break;
                                    case 41:
                                        result = "猎鹰之眼+" + num.ToString() + " ";
                                        break;
                                    case 42:
                                        result = "弓凝神聚气+" + num.ToString() + " ";
                                        break;
                                    case 43:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 44:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 45:
                                        result = "正本培元+" + num.ToString() + " ";
                                        break;
                                    case 46:
                                        result = "心神凝聚+" + num.ToString() + " ";
                                        break;
                                    case 47:
                                        result = "流星三矢+" + num.ToString() + " ";
                                        break;
                                    case 48:
                                        result = "锐利之箭+" + num.ToString() + " ";
                                        break;
                                    case 49:
                                        result = "弓无明暗矢+" + num.ToString() + " ";
                                        break;
                                    case 140:
                                        result = "致命绝杀+" + num.ToString() + " ";
                                        break;
                                    case 50:
                                        result = "运气行心+" + num.ToString() + " ";
                                        break;
                                    case 51:
                                        result = "太极心法+" + num.ToString() + " ";
                                        break;
                                    case 52:
                                        result = "体血倍增+" + num.ToString() + " ";
                                        break;
                                    case 53:
                                        result = "洗髓易经+" + num.ToString() + " ";
                                        break;
                                    case 54:
                                        result = "妙手回春+" + num.ToString() + " ";
                                        break;
                                    case 55:
                                        result = "长功攻击+" + num.ToString() + " ";
                                        break;
                                    case 56:
                                        result = "吸星大法+" + num.ToString() + " ";
                                        break;
                                    case 57:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 58:
                                        result = "天佑之气+" + num.ToString() + " ";
                                        break;
                                    case 59:
                                        result = "九天真气+" + num.ToString() + " ";
                                        break;
                                    case 150:
                                        result = "万物回春+" + num.ToString() + " ";
                                        break;
                                }
                                break;
                            case "9":
                                result = "升级成功率+" + num.ToString() + "% ";
                                break;
                            case "12":
                                result = "获得金钱+" + num.ToString() + "% ";
                                break;
                            case "13":
                                result = "死亡损失经验减少" + num.ToString() + "% ";
                                break;
                            case "15":
                                result = "经验获得+" + num.ToString() + "% ";
                                break;
                        }
                        break;
                    }
                case 7:
                    {
                        int num = int.Parse(ysqh.Substring(ysqh.Length - 2, 2));
                        switch (ysqh.Substring(0, 2))
                        {
                            case "10":
                                result = "追加伤害+" + num.ToString() + " ";
                                break;
                            case "11":
                                result = "武功防御+" + num.ToString() + " ";
                                break;
                        }
                        break;
                    }
                case 8:
                    {
                        string s = ysqh.Substring(6, 2);
                        int num = int.Parse(s);
                        switch (ysqh.Substring(0, 1))
                        {
                            case "1":
                                result = "攻击力+" + num.ToString() + " ";
                                break;
                            case "2":
                                result = "防御力+" + num.ToString() + " ";
                                break;
                            case "3":
                                result = "生命力+" + num.ToString() + " ";
                                break;
                            case "4":
                                result = "内功力+" + num.ToString() + " ";
                                break;
                            case "5":
                                result = "命中率+" + num.ToString() + " ";
                                break;
                            case "6":
                                result = "回避率+" + num.ToString() + " ";
                                break;
                            case "7":
                                result = "武功攻击力+" + num.ToString() + "% ";
                                break;
                            case "8":
                                switch (int.Parse(ysqh.Substring(4, 2)))
                                {
                                    case 0:
                                        result = "全部气功等级+" + num.ToString() + " ";
                                        break;
                                    case 10:
                                        result = "力劈华山+" + num.ToString() + " ";
                                        break;
                                    case 11:
                                        result = "摄魂一击+" + num.ToString() + " ";
                                        break;
                                    case 12:
                                        result = "连环飞舞+" + num.ToString() + " ";
                                        break;
                                    case 13:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 14:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 15:
                                        result = "四两千斤+" + num.ToString() + " ";
                                        break;
                                    case 16:
                                        result = "霸气破甲+" + num.ToString() + " ";
                                        break;
                                    case 17:
                                        result = "真武绝击+" + num.ToString() + " ";
                                        break;
                                    case 18:
                                        result = "暗影绝杀+" + num.ToString() + " ";
                                        break;
                                    case 19:
                                        result = "稳如泰山+" + num.ToString() + " ";
                                        break;
                                    case 110:
                                        result = "流光乱舞+" + num.ToString() + " ";
                                        break;
                                    case 20:
                                        result = "长虹贯日+" + num.ToString() + " ";
                                        break;
                                    case 21:
                                        result = "百变神行+" + num.ToString() + " ";
                                        break;
                                    case 22:
                                        result = "连环飞舞+" + num.ToString() + " ";
                                        break;
                                    case 23:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 24:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 25:
                                        result = "护身罡气+" + num.ToString() + " ";
                                        break;
                                    case 26:
                                        result = "移花接木+" + num.ToString() + " ";
                                        break;
                                    case 27:
                                        result = "回柳身法+" + num.ToString() + " ";
                                        break;
                                    case 28:
                                        result = "怒海狂澜+" + num.ToString() + " ";
                                        break;
                                    case 29:
                                        result = "冲冠一怒+" + num.ToString() + " ";
                                        break;
                                    case 120:
                                        result = "无坚不摧+" + num.ToString() + " ";
                                        break;
                                    case 30:
                                        result = "金钟罩气+" + num.ToString() + " ";
                                        break;
                                    case 31:
                                        result = "运气疗伤+" + num.ToString() + " ";
                                        break;
                                    case 32:
                                        result = "连环飞舞+" + num.ToString() + " ";
                                        break;
                                    case 33:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 34:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 35:
                                        result = "横练太保+" + num.ToString() + " ";
                                        break;
                                    case 36:
                                        result = "乾坤挪移+" + num.ToString() + " ";
                                        break;
                                    case 37:
                                        result = "灵甲护身+" + num.ToString() + " ";
                                        break;
                                    case 38:
                                        result = "狂神降世+" + num.ToString() + " ";
                                        break;
                                    case 39:
                                        result = "转守为攻+" + num.ToString() + " ";
                                        break;
                                    case 130:
                                        result = "末日狂舞+" + num.ToString() + " ";
                                        break;
                                    case 40:
                                        result = "百步穿杨+" + num.ToString() + " ";
                                        break;
                                    case 41:
                                        result = "猎鹰之眼+" + num.ToString() + " ";
                                        break;
                                    case 42:
                                        result = "弓凝神聚气+" + num.ToString() + " ";
                                        break;
                                    case 43:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 44:
                                        result = "狂风万破+" + num.ToString() + " ";
                                        break;
                                    case 45:
                                        result = "正本培元+" + num.ToString() + " ";
                                        break;
                                    case 46:
                                        result = "心神凝聚+" + num.ToString() + " ";
                                        break;
                                    case 47:
                                        result = "流星三矢+" + num.ToString() + " ";
                                        break;
                                    case 48:
                                        result = "锐利之箭+" + num.ToString() + " ";
                                        break;
                                    case 49:
                                        result = "弓无明暗矢+" + num.ToString() + " ";
                                        break;
                                    case 140:
                                        result = "致命绝杀+" + num.ToString() + " ";
                                        break;
                                    case 50:
                                        result = "运气行心+" + num.ToString() + " ";
                                        break;
                                    case 51:
                                        result = "太极心法+" + num.ToString() + " ";
                                        break;
                                    case 52:
                                        result = "体血倍增+" + num.ToString();
                                        break;
                                    case 53:
                                        result = "洗髓易经+" + num.ToString() + " ";
                                        break;
                                    case 54:
                                        result = "妙手回春+" + num.ToString() + " ";
                                        break;
                                    case 55:
                                        result = "长功攻击+" + num.ToString() + " ";
                                        break;
                                    case 56:
                                        result = "吸星大法+" + num.ToString() + " ";
                                        break;
                                    case 57:
                                        result = "必杀一击+" + num.ToString() + " ";
                                        break;
                                    case 58:
                                        result = "天佑之气+" + num.ToString() + " ";
                                        break;
                                    case 59:
                                        result = "九天真气+" + num.ToString() + " ";
                                        break;
                                    case 150:
                                        result = "万物回春+" + num.ToString() + " ";
                                        break;
                                }
                                break;
                            case "9":
                                result = "升级成功率+" + num.ToString() + " %";
                                break;
                            case "12":
                                result = "获得金钱+" + num.ToString() + " %";
                                break;
                            case "13":
                                result = "死亡损失经验减少" + num.ToString() + "% ";
                                break;
                            case "15":
                                result = "经验获得+" + num.ToString() + "% ";
                                break;
                        }
                        break;
                    }
                case 9:
                    {
                        int num = int.Parse(ysqh.Substring(ysqh.Length - 5, 5));
                        switch (ysqh.Substring(0, 2))
                        {
                            case "10":
                                result = "追加伤害+" + num.ToString() + " ";
                                break;
                            case "11":
                                result = "武功防御力+" + num.ToString() + " ";
                                break;
                            case "12":
                                result = "获得金钱+" + num.ToString() + "% ";
                                break;
                            case "13":
                                result = "死亡损失经验减少" + num.ToString() + "% ";
                                break;
                            case "15":
                                result = "经验获得+" + num.ToString() + "% ";
                                break;
                        }
                        break;
                    }
            }
            return result;
        }

        public string 得到物品说明(int FLD_MAGIC0, int FLD_MAGIC1, int FLD_MAGIC2, int FLD_MAGIC3, int FLD_MAGIC4, int 绑定, string username)
        {
            string str = "";
            str += 得到强化字符(FLD_MAGIC0.ToString());
            str += 得到属性字符(FLD_MAGIC1.ToString());
            str += 得到属性字符(FLD_MAGIC2.ToString());
            str += 得到属性字符(FLD_MAGIC3.ToString());
            str += 得到属性字符(FLD_MAGIC4.ToString());
            if (绑定 > 0)
            {
                str += "-物品绑定，购买后无法交易";
            }
            return str + " 卖家[" + username + "]";
        }

        public bool 检查灵兽背包是否为空(物品类 物品)
        {
            int num = BitConverter.ToInt32(物品.物品ID, 0);
            long num2 = BitConverter.ToInt64(物品.物品全局ID, 0);
            if (num == 1000000065 || num == 1000000066 || num == 1000000067 || num == 1000000068 || num == 1000000083 || num == 1000000084 || num == 1000000085 || num == 1000000086)
            {
                string sqlCommand = string.Format("SELECT FLD_ITEM FROM TBL_宠物数据 WHERE ItmeId ={0}", num2);
                DataTable dBToDataTable = DBA.GetDBToDataTable(sqlCommand);
                if (dBToDataTable.Rows.Count > 0)
                {
                    byte[] array = (byte[])dBToDataTable.Rows[0]["FLD_ITEM"];
                    for (int i = 0; i < array.Length; i++)
                    {
                        if (array[i] != 0)
                        {
                            dBToDataTable.Dispose();
                            return true;
                        }
                    }
                }
                dBToDataTable.Dispose();
            }
            return false;
        }

        public void 检查灵兽数(物品类 物品)
        {
            int num = BitConverter.ToInt32(物品.物品ID, 0);
            long num2 = BitConverter.ToInt64(物品.物品全局ID, 0);
            if (num == 1000000065 || num == 1000000066 || num == 1000000067 || num == 1000000068 || num == 1000000083 || num == 1000000084 || num == 1000000085 || num == 1000000086)
            {
                DataTable dataTable = RxjhClass.得到宠物数据(num2);
                if (dataTable != null)
                {
                    using (发包类 发包类 = new 发包类())
                    {
                        发包类.Write4(11);
                        发包类.Write4(1);
                        发包类.WriteString(dataTable.Rows[0]["Name"].ToString(), 16);
                        发包类.Write4(0);
                        发包类.Write((int)dataTable.Rows[0]["FLD_JOB"]);
                        发包类.Write((int)dataTable.Rows[0]["FLD_JOB_LEVEL"]);
                        发包类.Write2((int)dataTable.Rows[0]["FLD_LEVEL"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_HP"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_MAGIC1"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_MAGIC2"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_MAGIC3"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_MAGIC4"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_MAGIC5"]);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write(num2);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_BS"]);
                        if (Client != null)
                        {
                            Client.SendPak(发包类, 22800, 人物全服ID);
                        }
                    }
                    dataTable.Dispose();
                }
                else
                {
                    using (发包类 发包类2 = new 发包类())
                    {
                        发包类2.Write4(11);
                        发包类2.Write4(0);
                        if (Client != null)
                        {
                            Client.SendPak(发包类2, 22800, 人物全服ID);
                        }
                    }
                }
            }
            else
            {
                using (发包类 发包类3 = new 发包类())
                {
                    发包类3.Write4(11);
                    发包类3.Write4(0);
                    if (Client != null)
                    {
                        Client.SendPak(发包类3, 22800, 人物全服ID);
                    }
                }
            }
        }

        public bool 检查灵兽ID(int 物品ID)
        {
            if (物品ID == 1000000065 || 物品ID == 1000000066 || 物品ID == 1000000067 || 物品ID == 1000000068 || 物品ID == 1000000083 || 物品ID == 1000000084 || 物品ID == 1000000085 || 物品ID == 1000000086)
            {
                return true;
            }
            return false;
        }

        public void 商店检查灵兽数(List<long> 灵兽数量)
        {
            Dictionary<long, 人物持有灵兽类> dictionary = new Dictionary<long, 人物持有灵兽类>();
            for (int i = 0; i < 灵兽数量.Count; i++)
            {
                DataTable dataTable = RxjhClass.得到宠物数据(灵兽数量[i]);
                if (dataTable != null)
                {
                    人物持有灵兽类 人物持有灵兽类 = new 人物持有灵兽类();
                    人物持有灵兽类.全服ID = 灵兽数量[i];
                    人物持有灵兽类.宠物名 = dataTable.Rows[0]["Name"].ToString();
                    人物持有灵兽类.类别 = (int)dataTable.Rows[0]["FLD_JOB"];
                    人物持有灵兽类.转职 = (int)dataTable.Rows[0]["FLD_JOB_LEVEL"];
                    人物持有灵兽类.等级 = (int)dataTable.Rows[0]["FLD_LEVEL"];
                    人物持有灵兽类.变身 = (int)dataTable.Rows[0]["FLD_BS"];
                    人物持有灵兽类.生命 = (int)dataTable.Rows[0]["FLD_HP"];
                    dictionary.Add(灵兽数量[i], 人物持有灵兽类);
                    dataTable.Dispose();
                }
            }
            using (发包类 发包类 = new 发包类())
            {
                发包类.Write4(1);
                发包类.Write4(dictionary.Count);
                foreach (人物持有灵兽类 value in dictionary.Values)
                {
                    发包类.WriteString(value.宠物名, 16);
                    发包类.Write4(0);
                    发包类.Write(value.类别);
                    发包类.Write(value.转职);
                    发包类.Write2(value.等级);
                    发包类.Write4(value.生命);
                    发包类.Write4(0);
                    发包类.Write4(0);
                    发包类.Write4(0);
                    发包类.Write4(0);
                    发包类.Write4(0);
                    发包类.Write4(0);
                    发包类.Write4(0);
                    发包类.Write(value.全服ID);
                    发包类.Write4(value.变身);
                }
                if (Client != null)
                {
                    Client.SendPak(发包类, 22800, 人物全服ID);
                }
            }
        }

        public void 检查交易灵兽数(物品类 物品)
        {
            int num = BitConverter.ToInt32(物品.物品ID, 0);
            long num2 = BitConverter.ToInt64(物品.物品全局ID, 0);
            if (num == 1000000065 || num == 1000000066 || num == 1000000067 || num == 1000000068 || num == 1000000083 || num == 1000000084 || num == 1000000085 || num == 1000000086)
            {
                DataTable dataTable = RxjhClass.得到宠物数据(num2);
                if (dataTable != null)
                {
                    using (发包类 发包类 = new 发包类())
                    {
                        发包类.Write4(2);
                        发包类.Write4(1);
                        发包类.WriteString(dataTable.Rows[0]["Name"].ToString(), 16);
                        发包类.Write4(0);
                        发包类.Write((int)dataTable.Rows[0]["FLD_JOB"]);
                        发包类.Write((int)dataTable.Rows[0]["FLD_JOB_LEVEL"]);
                        发包类.Write2((int)dataTable.Rows[0]["FLD_LEVEL"]);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_HP"]);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write4(0);
                        发包类.Write(num2);
                        发包类.Write4((int)dataTable.Rows[0]["FLD_BS"]);
                        if (Client != null)
                        {
                            Client.SendPak(发包类, 22800, 人物全服ID);
                        }
                    }
                    dataTable.Dispose();
                }
            }
        }

        public void 灵兽加血(int sl)
        {
            if (人物灵兽.FLD_HP + sl < 人物灵兽.FLD_HP_MAX)
            {
                人物灵兽.FLD_HP += sl;
            }
            else
            {
                人物灵兽.FLD_HP = 人物灵兽.FLD_HP_MAX;
            }
            更新灵兽HP_MP_SP();
        }

        public void 灵兽加魔(int sl)
        {
            if (人物灵兽.FLD_MP + sl < 人物灵兽.FLD_MP_MAX)
            {
                人物灵兽.FLD_MP += sl;
            }
            else
            {
                人物灵兽.FLD_MP = 人物灵兽.FLD_MP_MAX;
            }
            更新灵兽HP_MP_SP();
        }

        public void 灵兽物品使用千年雪参(int 位置, int 数量)
        {
            try
            {
                string hex = "AA5523000000003B001400010A000065CA9A3B010000000100000000000000000000000000000055AAA";
                byte[] array = Converter.hexStringToByte(hex);
                byte[] array2 = new byte[4];
                Buffer.BlockCopy(装备栏包裹[位置].物品_byte, 20, array2, 0, 4);
                int num = BitConverter.ToInt32(array2, 0) - 2010000000 - 数量;
                Buffer.BlockCopy(BitConverter.GetBytes(位置), 0, array, 12, 2);
                Buffer.BlockCopy(装备栏包裹[位置].物品ID, 0, array, 15, 4);
                if (num <= 0)
                {
                    if (BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) <= 1)
                    {
                        Buffer.BlockCopy(BitConverter.GetBytes(0), 0, array, 23, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(2010000000), 0, array, 27, 4);
                        装备栏包裹[位置].物品_byte = new byte[73];
                    }
                    else
                    {
                        int value = BitConverter.ToInt32(装备栏包裹[位置].物品数量, 0) - 1;
                        装备栏包裹[位置].物品数量 = BitConverter.GetBytes(value);
                        Buffer.BlockCopy(BitConverter.GetBytes(2010600000), 0, 装备栏包裹[位置].物品_byte, 20, 4);
                        Buffer.BlockCopy(装备栏包裹[位置].物品数量, 0, array, 23, 4);
                        Buffer.BlockCopy(BitConverter.GetBytes(2010600000), 0, array, 27, 4);
                    }
                }
                else
                {
                    Buffer.BlockCopy(BitConverter.GetBytes(num + 2010000000), 0, 装备栏包裹[位置].物品_byte, 20, 4);
                    Buffer.BlockCopy(装备栏包裹[位置].物品数量, 0, array, 23, 4);
                    Buffer.BlockCopy(BitConverter.GetBytes(num + 2010000000), 0, array, 27, 4);
                }
                Buffer.BlockCopy(BitConverter.GetBytes(人物灵兽全服ID), 0, array, 5, 2);
                if (Client != null)
                {
                    Client.Send(array, array.Length);
                }
            }
            catch
            {
            }
        }

        public void 灵兽吃药效果(int 物品id)
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(物品id);
            if (Client != null)
            {
                Client.SendPak(发包类, 32512, 人物灵兽全服ID);
            }
            发送当前范围广播数据(发包类, 32512, 人物灵兽全服ID);
        }

        public void 宠物转职业(int 转)
        {
            人物灵兽.FLD_JOB_LEVEL = 转;
            发包类 发包类 = new 发包类();
            发包类.Write(转);
            发包类.Write(0);
            if (Client != null)
            {
                Client.SendPak(发包类, 32256, 人物灵兽全服ID);
            }
            发送当前范围广播数据(发包类, 32256, 人物灵兽全服ID);
        }

        public 发包类 得到更新灵兽数据(Players thisPlay)
        {
            发包类 发包类 = new 发包类();
            try
            {
                if (thisPlay == null)
                {
                    return null;
                }
                if (thisPlay.Client == null)
                {
                    return null;
                }
                发包类.Write4(1);
                发包类.Write4(thisPlay.人物灵兽全服ID);
                发包类.WriteString(thisPlay.人物灵兽.Name, 16);
                发包类.Write4(0);
                发包类.Write1(thisPlay.人物灵兽.FLD_LEVEL);
                发包类.Write1(thisPlay.人物灵兽.FLD_JOB_LEVEL);
                发包类.Write1(thisPlay.人物灵兽.FLD_JOB);
                发包类.Write1(0);
                发包类.Write2(thisPlay.人物灵兽.Bs);
                发包类.Write2(0);
                发包类.Write(thisPlay.人物灵兽.人物坐标_X);
                发包类.Write(thisPlay.人物灵兽.人物坐标_Z);
                发包类.Write(thisPlay.人物灵兽.人物坐标_Y);
                发包类.Write4(thisPlay.人物灵兽.人物坐标_MAP);
                for (int i = 0; i < 4; i++)
                {
                    发包类.Write4(thisPlay.人物灵兽.宠物以装备[i].Get物品ID);
                }
                发包类.Write1(0);
                发包类.Write1(1);
                发包类.Write2(0);
                发包类.Write(thisPlay.人物灵兽.人物坐标_X);
                发包类.Write(thisPlay.人物灵兽.人物坐标_Z);
                发包类.Write(thisPlay.人物灵兽.人物坐标_Y);
                发包类.Write4(0);
                发包类.Write1(0);
                return 发包类;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "得到更新灵兽数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + Converter.ToString(发包类.ToArray3()) + " " + ex);
                return null;
            }
        }

        public void 更新显示灵兽数据(Players thisPlay)
        {
            发包类 pak = 得到更新灵兽数据(thisPlay);
            if (Client != null)
            {
                Client.SendPak(pak, 25600, thisPlay.人物灵兽全服ID);
            }
        }

        public void 召唤提示(int kg, int id)
        {
            string hex = "AA551300000A005110050000000000030000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(kg), 0, array, 11, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 15, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(人物全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
        }

        public void 起名提示(int id)
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(id);
            发包类.Write4(0);
            if (Client != null)
            {
                Client.SendPak(发包类, 22288, 人物全服ID);
            }
        }

        public void 宠物动作(int id)
        {
            switch (id)
            {
                case 3:
                    人物灵兽.骑 = 1;
                    break;
                case 4:
                    人物灵兽.骑 = 0;
                    break;
            }
            string hex = "AA55100001549C5510010001000000000000000055AA";
            byte[] array = Converter.hexStringToByte(hex);
            Buffer.BlockCopy(BitConverter.GetBytes(id), 0, array, 11, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(人物灵兽全服ID), 0, array, 5, 2);
            if (Client != null)
            {
                Client.Send(array, array.Length);
            }
            发送当前范围广播数据(array, array.Length);
        }

        public void 召唤更新显示已装备物品(Players thisPlay)
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(1);
            byte[] array = new byte[48];
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽全服ID), 0, array, 0, 2);
            byte[] bytes = Encoding.Default.GetBytes(thisPlay.人物灵兽.Name);
            Buffer.BlockCopy(bytes, 0, array, 4, bytes.Length);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.FLD_LEVEL), 0, array, 24, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.FLD_JOB_LEVEL), 0, array, 26, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.FLD_JOB), 0, array, 27, 1);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.人物坐标_X), 0, array, 31, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.人物坐标_Z), 0, array, 35, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.人物坐标_Y), 0, array, 39, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(thisPlay.人物灵兽.人物坐标_MAP), 0, array, 43, 2);
            发包类.Write(array, 0, 48);
            for (int i = 0; i < 4; i++)
            {
                if (BitConverter.ToInt32(thisPlay.人物灵兽.宠物以装备[i].物品数量, 0) == 0)
                {
                    thisPlay.人物灵兽.宠物以装备[i].物品_byte = new byte[73];
                }
                else
                {
                    检查物品系统("灵兽已装备栏包裹", ref thisPlay.人物灵兽.宠物以装备[i]);
                }
                发包类.Write(thisPlay.人物灵兽.宠物以装备[i].GetByte(), 0, World.单个物品大小);
            }
            if (Client != null)
            {
                Client.SendPak(发包类, 40960, thisPlay.人物灵兽全服ID);
            }
        }

        public void 更新灵兽初始话装备篮包裹()
        {
            发包类 发包类 = new 发包类();
            发包类.Write1(1);
            发包类.Write1(37);
            发包类.Write2(0);
            发包类.Write4(0);
            for (int i = 0; i < 16; i++)
            {
                if (BitConverter.ToInt32(人物灵兽.宠物装备栏[i].物品数量, 0) == 0)
                {
                    人物灵兽.宠物装备栏[i].物品_byte = new byte[73];
                }
                else
                {
                    检查物品系统("灵兽装备栏包裹", ref 人物灵兽.宠物装备栏[i]);
                    ItmeClass itmeClass = World.Itme[人物灵兽.宠物装备栏[i].Get物品ID];
                    if (itmeClass.FLD_RESIDE1 != 6 && itmeClass.FLD_RESIDE1 != 7 && itmeClass.FLD_RESIDE1 != 8 && itmeClass.FLD_RESIDE1 != 9 && itmeClass.FLD_RESIDE1 != 10)
                    {
                        人物灵兽.宠物装备栏[i].物品_byte = new byte[73];
                    }
                }
                发包类.Write(人物灵兽.宠物装备栏[i].GetByte(), 0, World.单个物品大小);
            }
            if (Client != null)
            {
                Client.SendPak(发包类, 28928, 人物灵兽全服ID);
            }
        }

        public void 更新灵兽HP_MP_SP()
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(0);
            发包类.Write4(人物灵兽.FLD_HP);
            发包类.Write4(人物灵兽.FLD_MP);
            发包类.Write4(人物灵兽.FLD_HP_MAX);
            发包类.Write4(人物灵兽.FLD_MP_MAX);
            发包类.Write4(人物灵兽.FLD_ZCD);
            发包类.Write4(0);
            if (Client != null)
            {
                Client.SendPak(发包类, 26880, 人物灵兽全服ID);
            }
        }

        public void 更新灵兽经验和历练()
        {
            double num = Convert.ToInt64(World.Patlever[人物灵兽.FLD_LEVEL]) - Convert.ToInt64(World.Patlever[人物灵兽.FLD_LEVEL - 1]);
            double num2 = 人物灵兽.FLD_EXP - Convert.ToInt64(World.Patlever[人物灵兽.FLD_LEVEL - 1]);
            if (num2 < 1.0)
            {
                人物灵兽.FLD_EXP = Convert.ToInt64(World.Patlever[人物灵兽.FLD_LEVEL - 1]);
                num2 = 0.0;
            }
            发包类 发包类 = new 发包类();
            发包类.Write4((int)num2);
            发包类.Write4((int)num);
            发包类.Write4(0);
            发包类.Write4((int)人物灵兽.FLD_EXP);
            if (Client != null)
            {
                Client.SendPak(发包类, 27136, 人物灵兽全服ID);
            }
        }

        public void 更新灵兽武功和状态()
        {
            发包类 发包类 = new 发包类();
            发包类.Write2(人物灵兽.FLD_LEVEL);
            发包类.Write2(人物灵兽.灵兽_攻击力);
            发包类.Write2(人物灵兽.灵兽_防御力);
            发包类.Write2(人物灵兽.灵兽_命中);
            发包类.Write2(人物灵兽.灵兽_回避);
            发包类.Write2(0);
            for (int i = 0; i < 16; i++)
            {
                发包类.Write4(人物灵兽.武功[0, i].FLD_PID);
            }
            for (int j = 0; j < 16; j++)
            {
                发包类.Write4(人物灵兽.武功[1, j].FLD_PID);
            }
            发包类.Write4(人物灵兽.FLD_MAGIC1);
            发包类.Write4(人物灵兽.FLD_MAGIC2);
            发包类.Write4(人物灵兽.FLD_MAGIC3);
            发包类.Write4(人物灵兽.FLD_MAGIC4);
            发包类.Write4(人物灵兽.FLD_MAGIC5);
            if (Client != null)
            {
                Client.SendPak(发包类, 27392, 人物灵兽全服ID);
            }
        }

        public void 更新灵兽负重()
        {
            发包类 发包类 = new 发包类();
            发包类.Write4(0);
            发包类.Write4(0);
            发包类.Write4(人物灵兽.FLD_负重);
            发包类.Write4(人物灵兽.FLD_负重_MAX);
            if (Client != null)
            {
                Client.SendPak(发包类, 31744, 人物灵兽全服ID);
            }
        }

        public void 灵兽升级后的提示()
        {
            if (人物灵兽 != null)
            {
                发包类 发包类 = new 发包类();
                发包类.Write1(人物灵兽.FLD_LEVEL);
                发包类.Write1(1);
                if (Client != null)
                {
                    Client.SendPak(发包类, 30464, 人物灵兽全服ID);
                }
                发送当前范围广播数据(发包类, 30464, 人物灵兽全服ID);
            }
        }

        public void 人物获得经验(double 经验)
        {
            if (FLD_人物_复仇_经验百分比 != 0)
            {
                经验 -= 经验 * FLD_人物_复仇_经验百分比;
            }
            if (经验 <= 0.0 || Player死亡)
            {
                return;
            }
            if (人物灵兽 != null)
            {
                if (人物灵兽.FLD_ZCD > 2000)
                {
                    人物灵兽.FLD_ZCD = 2000;
                }
                else if (人物灵兽.FLD_ZCD < 0)
                {
                    人物灵兽.FLD_ZCD = 0;
                }
                double num = 1.0;
                double num2 = (double)人物灵兽.FLD_LEVEL * 0.0025;
                num += num2;
                num = ((人物灵兽.FLD_JOB == 4) ? (num + 0.1) : ((人物灵兽.FLD_JOB == 3) ? (num + 0.05) : ((人物灵兽.FLD_JOB != 2) ? (num + 0.02) : (num + 0.03))));
                num += 人物灵兽.FLD_装备_追加_经验百分比;
                经验 = 经验 * num * (0.8 + 0.2 * (double)人物灵兽.FLD_ZCD / 2000.0);
                if (人物灵兽.FLD_LEVEL < 99)
                {
                    int num3 = Config.宠物经验;
                    if (num3 > 100)
                    {
                        num3 = 100;
                    }
                    else if (num3 < 0)
                    {
                        num3 = 0;
                    }
                    if (Player_Level < World.人物最高等级)
                    {
                        人物经验 += (int)(经验 * (double)(100 - num3) / 100.0);
                    }
                    人物灵兽.FLD_EXP += (int)(经验 * (double)num3 / 100.0);
                    人物灵兽.计算宠物基本数据();
                    更新灵兽HP_MP_SP();
                    更新灵兽经验和历练();
                    更新灵兽武功和状态();
                }
                else if (Player_Level < World.人物最高等级)
                {
                    人物经验 += (int)经验;
                }
            }
            else if (Player_Level < World.人物最高等级)
            {
                人物经验 += (int)经验;
            }
        }

        public void 人物获得金币(int 金币, int 类型)
        {
            if (金币 < 0 || Player_Money + 金币 < 0)
            {
                return;
            }
            if (类型 == 1)
            {
                if (金币 >= 0 && Player_Money + 金币 >= 0 && Player_Money + 金币 <= World.最大钱数)
                {
                    Player_Money += 金币;
                }
            }
            else
            {
                Player_Money -= 金币;
            }
        }

        public 发包类 得到更新宠物数据(Players thisPlay)
        {
            发包类 发包类 = new 发包类();
            try
            {
                if (thisPlay == null)
                {
                    return null;
                }
                if (thisPlay.Client == null)
                {
                    return null;
                }
                发包类.Write4(1);
                发包类.Write2(thisPlay.收服宠物.FLD_INDEX);
                发包类.Write2(thisPlay.收服宠物.FLD_INDEX);
                发包类.Write2(thisPlay.收服宠物.FLD_PID);
                发包类.Write4(1);
                发包类.Write4(0);
                发包类.Write4(0);
                发包类.Write(thisPlay.收服宠物.Rxjh_X);
                发包类.Write(thisPlay.收服宠物.Rxjh_Z);
                发包类.Write(thisPlay.收服宠物.Rxjh_Y);
                发包类.Write4(1082130432);
                发包类.Write(thisPlay.收服宠物.FLD_FACE1);
                发包类.Write(thisPlay.收服宠物.FLD_FACE2);
                发包类.Write(thisPlay.收服宠物.Rxjh_X);
                发包类.Write(thisPlay.收服宠物.Rxjh_Z);
                发包类.Write(thisPlay.收服宠物.Rxjh_Y);
                发包类.Write4(3);
                发包类.Write4(0);
                发包类.Write4(12);
                发包类.Write4(0);
                return 发包类;
            }
            catch (Exception ex)
            {
                Form1.WriteLine(1, "得到更新灵兽数据 出错" + Client.WorldId + "|" + Client.ToString() + " " + Converter.ToString(发包类.ToArray3()) + " " + ex);
                return null;
            }
        }

        public void 更新显示宠物数据(Players thisPlay)
        {
            发包类 pak = 得到更新宠物数据(thisPlay);
            if (Client != null)
            {
                Client.SendPak(pak, 25600, thisPlay.收服宠物.FLD_INDEX);
            }
        }
    }

}
